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

This commit is contained in:
rjy7 2010-04-02 22:30:09 +00:00
parent 0a7a40074e
commit e4a2e10c41
6 changed files with 47 additions and 37 deletions

View file

@ -12,7 +12,7 @@
font-size: 110%; font-size: 110%;
} }
#content form div#addNewLink { #content form div.addNewLink {
float: left; float: left;
clear: none; clear: none;
margin-left: 5em; margin-left: 5em;
@ -23,17 +23,17 @@
display: none; /* Hide if Javascript disabled. Javascript will show. */ display: none; /* Hide if Javascript disabled. Javascript will show. */
} }
#content form #existing { #content form .existing {
float: left; float: left;
clear: none; clear: none;
} }
#existingOrNew { .existingOrNew {
font-style: italic; font-style: italic;
margin-left: 1em; margin-left: 1em;
} }
#new { .new {
padding: .6em 0 .6em 1.5em; padding: .6em 0 .6em 1.5em;
border: 1px solid #9c9c9c; border: 1px solid #9c9c9c;
width: 70%; width: 70%;
@ -86,3 +86,7 @@ option {
clear: both; clear: both;
margin-bottom: 1.25em; margin-bottom: 1.25em;
} }
.close {
display: none; /* Hide if Javascript disabled. Javascript will show. */
}

View file

@ -1,6 +1,6 @@
/* $This file is distributed under the terms of the license in /doc/license.txt$ */ /* $This file is distributed under the terms of the license in /doc/license.txt$ */
#content form #existing { #content form .existing {
clear: left; clear: left;
} }

View file

@ -34,12 +34,14 @@ var customFormOneStep = {
this.addNewLink = $('#addNewLink'); this.addNewLink = $('#addNewLink');
this.existing = $('#existing'); this.existing = $('#existing');
this.addNew = $('#new'); this.addNew = $('#new');
this.entry = $('#entry'); this.entry = $('.entry');
this.existingOrNew = $('#existingOrNew'); this.existingOrNew = $('#existingOrNew');
this.cancel = this.form.find('.cancel'); 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 // Read values used to control display
this.editType = $("input[name='editType']").val(); this.editType = $("input[name='editType']").val();
this.entryType = $("input[name='entryType']").val().capitalizeWords(); this.entryType = $("input[name='entryType']").val().capitalizeWords();

View file

@ -48,11 +48,11 @@ var customFormTwoStep = {
// These may need to be changed to classes rather than ids, if there are // These may need to be changed to classes rather than ids, if there are
// multiple sets of divs to show/hide during the workflow. // multiple sets of divs to show/hide during the workflow.
this.addNewLink = $('#addNewLink'); this.addNewLink = $('.addNewLink');
this.existing = $('#existing'); this.existing = $('.existing');
this.addNew = $('#new'); this.addNew = $('.new');
this.entry = $('.entry'); this.entry = $('.entry');
this.existingOrNew = $('#existingOrNew'); this.existingOrNew = $('.existingOrNew');
this.cancel = this.form.find('.cancel'); this.cancel = this.form.find('.cancel');
this.requiredHints = this.form.find('.requiredHint'); 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.. // These are features that will NOT CHANGE throughout the workflow of the Javascript version..
adjustForJs: function() { adjustForJs: function() {
var selectExistingLabel = $('#existing label'); var selectExistingLabel = $('.existing label');
selectExistingLabel.html(selectExistingLabel.html().replace(/Select (Existing )?/, '')); selectExistingLabel.html(selectExistingLabel.html().replace(/Select (Existing )?/, ''));
this.existingOrNew.hide(); this.existingOrNew.hide();

View file

@ -373,18 +373,20 @@ core:organizationGrantingDegree (EducationalBackground : Organization) - no inve
<p class="inline year"><v:input type="text" label="Year ${requiredHint} <span class='hint'>(YYYY)</span>" id="year" size="4" /></p> <p class="inline year"><v:input type="text" label="Year ${requiredHint} <span class='hint'>(YYYY)</span>" id="year" size="4" /></p>
</div> </div>
<div id="existing"> <div class="relatedIndividual">
<v:input type="select" label="Organization Granting Degree" labelClass="required" id="organizationUri" /><span id="existingOrNew">or</span> <div class="existing">
</div> <v:input type="select" label="Select Existing Organization" labelClass="required" id="organizationUri" /><span class="existingOrNew">or</span>
</div>
<div id="addNewLink"> <div class="addNewLink">
If your organization is not listed, please <a href="#">add a new organization</a>. If your organization is not listed, please <a href="#">add a new organization</a>.
</div> </div>
<div id="new"> <div class="new">
<h6>Add a New Organization</h6> <h6>Add a New Organization</h6>
<v:input type="text" label="Organization Name" labelClass="required" id="newOrgName" /> <v:input type="text" label="Organization Name" labelClass="required" id="newOrgName" />
<v:input type="select" label="Organization Type" labelClass="required" id="newOrgType" /> <v:input type="select" label="Select Organization Type" labelClass="required" id="newOrgType" />
</div>
</div> </div>
<div class="entry"> <div class="entry">

View file

@ -308,18 +308,20 @@
<form class="${editType}" action="<c:url value="/edit/processRdfForm2.jsp"/>" > <form class="${editType}" action="<c:url value="/edit/processRdfForm2.jsp"/>" >
<div id="existing"> <div class="relatedIndividual">
<v:input type="select" label="Select Existing Organization" labelClass="required" id="organizationUri" /><span id="existingOrNew">or</span> <div class="existing">
</div> <v:input type="select" label="Select Existing Organization" labelClass="required" id="organizationUri" /><span class="existingOrNew">or</span>
</div>
<div id="addNewLink"> <div class="addNewLink">
If your organization is not listed, please <a href="#">add a new organization</a>. If your organization is not listed, please <a href="#">add a new organization</a>.
</div> </div>
<div id="new"> <div class="new">
<h6>Add a New Organization</h6> <h6>Add a New Organization</h6>
<v:input type="text" label="Organization Name" labelClass="required" id="newOrgName" /> <v:input type="text" label="Organization Name" labelClass="required" id="newOrgName" />
<v:input type="select" label="Select Organization Type" labelClass="required" id="newOrgType" /> <v:input type="select" label="Select Organization Type" labelClass="required" id="newOrgType" />
</div>
</div> </div>
<div class="entry"> <div class="entry">