From cb15494b9559fcee7862948a7afb5df896b8be3c Mon Sep 17 00:00:00 2001 From: rjy7 Date: Thu, 22 Jul 2010 15:43:18 +0000 Subject: [PATCH] Merge r1010 r1018:1023 from http://svn.mannlib.cornell.edu/svn/vivo/branches/rel-1.1-maint --- .../edit/forms/addGrantRoleToPerson.jsp | 6 +++++- .../edit/forms/addPublicationToPerson.jsp | 5 ++++- .../customFormWithAdvanceTypeSelection.css | 4 ++++ .../js/customFormWithAdvanceTypeSelection.js | 20 +++++++++++++++++++ .../edit/forms/unsupportedBrowserMessage.jsp | 15 ++++++++++++++ 5 files changed, 48 insertions(+), 2 deletions(-) create mode 100644 productMods/edit/forms/unsupportedBrowserMessage.jsp diff --git a/productMods/edit/forms/addGrantRoleToPerson.jsp b/productMods/edit/forms/addGrantRoleToPerson.jsp index 65ec8a7e..206e9410 100644 --- a/productMods/edit/forms/addGrantRoleToPerson.jsp +++ b/productMods/edit/forms/addGrantRoleToPerson.jsp @@ -248,6 +248,7 @@ PREFIX core: <${vivoCore}> List customJs = new ArrayList(Arrays.asList(JavaScript.JQUERY_UI.path(), JavaScript.CUSTOM_FORM_UTILS.path(), + "/js/browserUtils.js", "/edit/forms/js/customFormWithAdvanceTypeSelection.js" )); request.setAttribute("customJs", customJs); @@ -279,8 +280,10 @@ PREFIX core: <${vivoCore}>

${formHeading}

+<%@ include file="unsupportedBrowserMessage.jsp" %> + <%-- DO NOT CHANGE IDS, CLASSES, OR HTML STRUCTURE IN THIS FORM WITHOUT UNDERSTANDING THE IMPACT ON THE JAVASCRIPT! --%> -
" > +" >

@@ -299,6 +302,7 @@ PREFIX core: <${vivoCore}>

* required fields

+ diff --git a/productMods/edit/forms/addPublicationToPerson.jsp b/productMods/edit/forms/addPublicationToPerson.jsp index 049d11cf..118f67f3 100644 --- a/productMods/edit/forms/addPublicationToPerson.jsp +++ b/productMods/edit/forms/addPublicationToPerson.jsp @@ -210,6 +210,7 @@ SPARQL queries for existing values. --%> editConfig.setEntityToReturnTo("?pubUri"); List customJs = new ArrayList(Arrays.asList(JavaScript.JQUERY_UI.path(), JavaScript.CUSTOM_FORM_UTILS.path(), + "/js/browserUtils.js", "/edit/forms/js/customFormWithAdvanceTypeSelection.js" )); request.setAttribute("customJs", customJs); @@ -228,8 +229,10 @@ SPARQL queries for existing values. --%>

Create a new publication entry for <%= subjectName %>

+<%@ include file="unsupportedBrowserMessage.jsp" % + <%-- DO NOT CHANGE IDS, CLASSES, OR HTML STRUCTURE IN THIS FORM WITHOUT UNDERSTANDING THE IMPACT ON THE JAVASCRIPT! --%> -
" > +" >

diff --git a/productMods/edit/forms/css/customFormWithAdvanceTypeSelection.css b/productMods/edit/forms/css/customFormWithAdvanceTypeSelection.css index fd603423..a8489cc5 100644 --- a/productMods/edit/forms/css/customFormWithAdvanceTypeSelection.css +++ b/productMods/edit/forms/css/customFormWithAdvanceTypeSelection.css @@ -9,6 +9,10 @@ display: none; } +#ie67DisableWrapper { + display: none; +} + #content form p.inline label { display: inline; clear: none; diff --git a/productMods/edit/forms/js/customFormWithAdvanceTypeSelection.js b/productMods/edit/forms/js/customFormWithAdvanceTypeSelection.js index ee7de99c..506a5bc0 100644 --- a/productMods/edit/forms/js/customFormWithAdvanceTypeSelection.js +++ b/productMods/edit/forms/js/customFormWithAdvanceTypeSelection.js @@ -5,10 +5,28 @@ var customForm = { /* *** Initial page setup *** */ onLoad: function() { + + if (this.disableFormInUnsupportedBrowsers()) { + return; + } this.mixIn(); this.initObjects(); this.initPage(); }, + + disableFormInUnsupportedBrowsers: function() { + this.disableWrapper = $('#ie67DisableWrapper'); + + // Check for unsupported browsers only if the element exists on the page + if (this.disableWrapper.length) { + if (vitro.browserUtils.isIELessThan8()) { + this.disableWrapper.show(); + $('form.noIE67').hide(); + return true; + } + } + return false; + }, mixIn: function() { // Mix in the custom form utility methods @@ -74,6 +92,8 @@ var customForm = { } else { this.formSteps = 2; } + // RY This should probably be done from initFormFullView, since there + // are not two form steps in this case. if( this.editMode == 'repair') this.formSteps = 2; diff --git a/productMods/edit/forms/unsupportedBrowserMessage.jsp b/productMods/edit/forms/unsupportedBrowserMessage.jsp new file mode 100644 index 00000000..6a9bdd0f --- /dev/null +++ b/productMods/edit/forms/unsupportedBrowserMessage.jsp @@ -0,0 +1,15 @@ +<%-- $This file is distributed under the terms of the license in /doc/license.txt$ --%> + +<%@ taglib prefix="c" uri="http://java.sun.com/jstl/core"%> + + + + + +
+
+ Alert Icon +

This form is not supported for use in Internet Explorer 6 or 7. Please upgrade to Internet Explorer 8, or + switch to another browser, such as FireFox.

+
+
\ No newline at end of file