NIHVIVO-194. Added button text modification to close button event listener.
This commit is contained in:
parent
a936fbb03c
commit
99d737a399
1 changed files with 8 additions and 7 deletions
|
@ -199,7 +199,7 @@ var customForm = {
|
||||||
doAddFormStep2Combined: function() {
|
doAddFormStep2Combined: function() {
|
||||||
|
|
||||||
customForm.showCombinedFields();
|
customForm.showCombinedFields();
|
||||||
customForm.doAddNewLink(customForm.addNewButtonText);
|
customForm.doAddNewLink();
|
||||||
customForm.doButtonForStep2(customForm.defaultButtonText);
|
customForm.doButtonForStep2(customForm.defaultButtonText);
|
||||||
customForm.doCancelForStep2();
|
customForm.doCancelForStep2();
|
||||||
},
|
},
|
||||||
|
@ -244,7 +244,7 @@ var customForm = {
|
||||||
doEditFormDefaultView: function() {
|
doEditFormDefaultView: function() {
|
||||||
this.showCombinedFields();
|
this.showCombinedFields();
|
||||||
this.button.val(this.defaultButtonText);
|
this.button.val(this.defaultButtonText);
|
||||||
this.doAddNewLink(this.addNewButtonText);
|
this.doAddNewLink();
|
||||||
},
|
},
|
||||||
|
|
||||||
/***** Utilities *****/
|
/***** Utilities *****/
|
||||||
|
@ -323,7 +323,7 @@ var customForm = {
|
||||||
});
|
});
|
||||||
},
|
},
|
||||||
|
|
||||||
doAddNewLink: function(buttonText) {
|
doAddNewLink: function() {
|
||||||
|
|
||||||
customForm.addNewLink.unbind('click');
|
customForm.addNewLink.unbind('click');
|
||||||
customForm.addNewLink.bind('click', function() {
|
customForm.addNewLink.bind('click', function() {
|
||||||
|
@ -333,12 +333,12 @@ var customForm = {
|
||||||
// else it could be submitted even when hidden.
|
// else it could be submitted even when hidden.
|
||||||
// RY When we have multiple existing and addNew divs, we won't
|
// RY When we have multiple existing and addNew divs, we won't
|
||||||
// show/hide them all, only the siblings of the addNewLink.
|
// show/hide them all, only the siblings of the addNewLink.
|
||||||
|
// And we'll need to figure out the button text based on which
|
||||||
|
// div we're opening.
|
||||||
customForm.hideFields(customForm.existing);
|
customForm.hideFields(customForm.existing);
|
||||||
customForm.showFields(customForm.addNew);
|
customForm.showFields(customForm.addNew);
|
||||||
|
customForm.button.val(customForm.addNewButtonText);
|
||||||
|
|
||||||
if (buttonText) {
|
|
||||||
customForm.button.val(buttonText);
|
|
||||||
}
|
|
||||||
return false;
|
return false;
|
||||||
});
|
});
|
||||||
},
|
},
|
||||||
|
@ -352,6 +352,7 @@ var customForm = {
|
||||||
customForm.showFields(customForm.existing);
|
customForm.showFields(customForm.existing);
|
||||||
customForm.hideFields(customForm.addNew);
|
customForm.hideFields(customForm.addNew);
|
||||||
customForm.addNewLink.show();
|
customForm.addNewLink.show();
|
||||||
|
customForm.button.val(customForm.defaultButtonText);
|
||||||
return false;
|
return false;
|
||||||
});
|
});
|
||||||
},
|
},
|
||||||
|
|
Loading…
Add table
Reference in a new issue