Skip to content

Commit

Permalink
[FIXED JENKINS-21457] Replace description in error dialog instead of …
Browse files Browse the repository at this point in the history
…appending

(cherry picked from commit 581024b)
  • Loading branch information
olivergondza committed Feb 16, 2014
1 parent fec6b41 commit ec071ee
Showing 1 changed file with 8 additions and 1 deletion.
9 changes: 8 additions & 1 deletion core/src/main/resources/lib/form/apply/apply.js
Expand Up @@ -42,8 +42,15 @@ Behaviour.specify("INPUT.apply-button", 'apply', 0, function (e) {
var error = doc.getElementById('error-description');
if (!error) {
// fallback if it's not a regular error dialog from oops.jelly: use the entire body
error = doc.getElementsByTagName('body')[0];
error = Element('div', {id: 'error-description'});
error.appendChild(doc.getElementsByTagName('body')[0]);
}

if (oldError = $('error-description')) {
// Remove old error if there is any
$(containerId).removeChild(oldError);
}

$(containerId).appendChild(error);
var r = YAHOO.util.Dom.getClientRegion();

Expand Down

0 comments on commit ec071ee

Please sign in to comment.