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

@ -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();

View file

@ -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();