diff --git a/productMods/edit/forms/addAuthorsToInformationResource.jsp b/productMods/edit/forms/addAuthorsToInformationResource.jsp index 705f893c..eaf36be4 100644 --- a/productMods/edit/forms/addAuthorsToInformationResource.jsp +++ b/productMods/edit/forms/addAuthorsToInformationResource.jsp @@ -253,6 +253,7 @@ SPARQL queries for existing values. --%> List customJs = new ArrayList(Arrays.asList(JavaScript.JQUERY_UI.path(), JavaScript.CUSTOM_FORM_UTILS.path(), + "/js/browserUtils.js", "/edit/forms/js/addAuthorsToInformationResource.js" )); request.setAttribute("customJs", customJs); @@ -287,6 +288,9 @@ SPARQL queries for existing values. --%> <%-- DO NOT CHANGE IDS, CLASSES, OR HTML STRUCTURE ON THIS PAGE WITHOUT UNDERSTANDING THE IMPACT ON THE JAVASCRIPT! --%>

${title}

+<%@ include file="unsupportedBrowserMessage.jsp" %> + +

Manage Authors

    > @@ -403,6 +407,7 @@ SPARQL queries for existing values. --%>

    * required fields

    +
diff --git a/productMods/edit/forms/css/customForm.css b/productMods/edit/forms/css/customForm.css index 0be6d37c..2ecd9b87 100644 --- a/productMods/edit/forms/css/customForm.css +++ b/productMods/edit/forms/css/customForm.css @@ -108,3 +108,10 @@ option { .or, .cancel{ vertical-align:top; } + +/* Message displayed for an unsupported browser. Hide on page load; JavaScript + * shows if needed. + */ +#ie67DisableWrapper { + display: none; +} diff --git a/productMods/edit/forms/css/customFormWithAdvanceTypeSelection.css b/productMods/edit/forms/css/customFormWithAdvanceTypeSelection.css index a8489cc5..fd603423 100644 --- a/productMods/edit/forms/css/customFormWithAdvanceTypeSelection.css +++ b/productMods/edit/forms/css/customFormWithAdvanceTypeSelection.css @@ -9,10 +9,6 @@ display: none; } -#ie67DisableWrapper { - display: none; -} - #content form p.inline label { display: inline; clear: none; diff --git a/productMods/edit/forms/js/addAuthorsToInformationResource.js b/productMods/edit/forms/js/addAuthorsToInformationResource.js index 71daffda..bfdbcac6 100644 --- a/productMods/edit/forms/js/addAuthorsToInformationResource.js +++ b/productMods/edit/forms/js/addAuthorsToInformationResource.js @@ -5,11 +5,15 @@ var addAuthorForm = { /* *** Initial page setup *** */ onLoad: function() { + + if (this.disableFormInUnsupportedBrowsers()) { + return; + } this.mixIn(); this.initObjects(); this.initPage(); }, - + mixIn: function() { // Mix in the custom form utility methods $.extend(this, vitro.customFormUtils); @@ -192,6 +196,8 @@ var addAuthorForm = { }); }, + // Select event not triggered in IE6/7 when selecting with enter key rather + // than mouse. select: function(event, ui) { addAuthorForm.showSelectedAuthor(ui); } @@ -439,13 +445,15 @@ var addAuthorForm = { addAuthorForm.onLastNameChange(); }); - // When hitting enter in last name field, if not an autocomplete - // selection, show first and middle name fields. + // When hitting enter in last name field, show first and middle name fields. + // NB This event fires when selecting an autocomplete suggestion with the enter + // key, and there's no way to prevent it. Since it fires first, we undo its + // effects in the ac select event listener. this.lastNameField.keydown(function(event) { - if (event.keyCode === 13) { - addAuthorForm.onLastNameChange(); - return false; // don't submit form - } + if (event.which === 13) { + addAuthorForm.onLastNameChange(); + return false; // don't submit form + } }); this.removeAuthorshipLinks.click(function() {