From e4a2e10c41468c63b4fd0ba4a43dfafb32c8df01 Mon Sep 17 00:00:00 2001 From: rjy7 Date: Fri, 2 Apr 2010 22:30:09 +0000 Subject: [PATCH] NIHVIVO-194 Change ids to classes to accomodate the possibility of additional related objects, and enclose the existing/addNew/new divs into a containing div --- productMods/edit/forms/css/customForm.css | 12 +++++--- .../css/personHasEducationalBackground.css | 2 +- .../edit/forms/js/customFormOneStep.js | 6 ++-- .../edit/forms/js/customFormTwoStep.js | 10 +++---- .../forms/personHasEducationalBackground.jsp | 28 ++++++++++--------- .../edit/forms/personHasPositionHistory.jsp | 26 +++++++++-------- 6 files changed, 47 insertions(+), 37 deletions(-) diff --git a/productMods/edit/forms/css/customForm.css b/productMods/edit/forms/css/customForm.css index fcb4beda..64646eda 100644 --- a/productMods/edit/forms/css/customForm.css +++ b/productMods/edit/forms/css/customForm.css @@ -12,7 +12,7 @@ font-size: 110%; } -#content form div#addNewLink { +#content form div.addNewLink { float: left; clear: none; margin-left: 5em; @@ -23,17 +23,17 @@ display: none; /* Hide if Javascript disabled. Javascript will show. */ } -#content form #existing { +#content form .existing { float: left; clear: none; } -#existingOrNew { +.existingOrNew { font-style: italic; margin-left: 1em; } -#new { +.new { padding: .6em 0 .6em 1.5em; border: 1px solid #9c9c9c; width: 70%; @@ -85,4 +85,8 @@ option { #content form p.validationError { clear: both; margin-bottom: 1.25em; +} + +.close { + display: none; /* Hide if Javascript disabled. Javascript will show. */ } \ No newline at end of file diff --git a/productMods/edit/forms/css/personHasEducationalBackground.css b/productMods/edit/forms/css/personHasEducationalBackground.css index 34c36925..5be12408 100644 --- a/productMods/edit/forms/css/personHasEducationalBackground.css +++ b/productMods/edit/forms/css/personHasEducationalBackground.css @@ -1,6 +1,6 @@ /* $This file is distributed under the terms of the license in /doc/license.txt$ */ -#content form #existing { +#content form .existing { clear: left; } diff --git a/productMods/edit/forms/js/customFormOneStep.js b/productMods/edit/forms/js/customFormOneStep.js index 019bb7de..ea9eb9e7 100644 --- a/productMods/edit/forms/js/customFormOneStep.js +++ b/productMods/edit/forms/js/customFormOneStep.js @@ -34,11 +34,13 @@ var customFormOneStep = { this.addNewLink = $('#addNewLink'); this.existing = $('#existing'); this.addNew = $('#new'); - this.entry = $('#entry'); + this.entry = $('.entry'); this.existingOrNew = $('#existingOrNew'); this.cancel = this.form.find('.cancel'); - this.requiredHints = this.form.find('.requiredHint'); + this.requiredHints = this.form.find('.requiredHint'); + + this.close = this.form.find('.close'); // Read values used to control display this.editType = $("input[name='editType']").val(); diff --git a/productMods/edit/forms/js/customFormTwoStep.js b/productMods/edit/forms/js/customFormTwoStep.js index a0512c89..de3e1518 100644 --- a/productMods/edit/forms/js/customFormTwoStep.js +++ b/productMods/edit/forms/js/customFormTwoStep.js @@ -48,11 +48,11 @@ var customFormTwoStep = { // These may need to be changed to classes rather than ids, if there are // multiple sets of divs to show/hide during the workflow. - this.addNewLink = $('#addNewLink'); - this.existing = $('#existing'); - this.addNew = $('#new'); + this.addNewLink = $('.addNewLink'); + this.existing = $('.existing'); + this.addNew = $('.new'); this.entry = $('.entry'); - this.existingOrNew = $('#existingOrNew'); + this.existingOrNew = $('.existingOrNew'); this.cancel = this.form.find('.cancel'); this.requiredHints = this.form.find('.requiredHint'); @@ -68,7 +68,7 @@ var customFormTwoStep = { // These are features that will NOT CHANGE throughout the workflow of the Javascript version.. adjustForJs: function() { - var selectExistingLabel = $('#existing label'); + var selectExistingLabel = $('.existing label'); selectExistingLabel.html(selectExistingLabel.html().replace(/Select (Existing )?/, '')); this.existingOrNew.hide(); diff --git a/productMods/edit/forms/personHasEducationalBackground.jsp b/productMods/edit/forms/personHasEducationalBackground.jsp index 10e6fcc0..4c213130 100644 --- a/productMods/edit/forms/personHasEducationalBackground.jsp +++ b/productMods/edit/forms/personHasEducationalBackground.jsp @@ -372,20 +372,22 @@ core:organizationGrantingDegree (EducationalBackground : Organization) - no inve

- -
- or -
+ +
+
+ or +
- - -
-
Add a New Organization
- - -
+ + +
+
Add a New Organization
+ + +
+
diff --git a/productMods/edit/forms/personHasPositionHistory.jsp b/productMods/edit/forms/personHasPositionHistory.jsp index c6f7dd00..bf94f47a 100644 --- a/productMods/edit/forms/personHasPositionHistory.jsp +++ b/productMods/edit/forms/personHasPositionHistory.jsp @@ -308,19 +308,21 @@
" > -
- or -
+
+
+ or +
- - -
-
Add a New Organization
- - -
+ + +
+
Add a New Organization
+ + +
+