diff options
author | Frédéric Buclin <LpSolit@gmail.com> | 2010-07-18 19:17:26 +0200 |
---|---|---|
committer | Frédéric Buclin <LpSolit@gmail.com> | 2010-07-18 19:17:26 +0200 |
commit | 2addcaadedfe714bd0502911cc85cdab24736465 (patch) | |
tree | 0e58e2ce48866cdf7198d7d45df1348bf1e0859a /js | |
parent | Bug 579695: Make xt/search.t do substring tests using a more consistent (diff) | |
download | bugzilla-2addcaadedfe714bd0502911cc85cdab24736465.tar.gz bugzilla-2addcaadedfe714bd0502911cc85cdab24736465.tar.bz2 bugzilla-2addcaadedfe714bd0502911cc85cdab24736465.zip |
Bug 119703: Create an attachment by pasting it into a text field
r/a=mkanat
Diffstat (limited to 'js')
-rw-r--r-- | js/attachment.js | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/js/attachment.js b/js/attachment.js index 314e4acb1..dfa6d472d 100644 --- a/js/attachment.js +++ b/js/attachment.js @@ -53,13 +53,13 @@ function setContentTypeDisabledState(form) form.contenttypeentry.disabled = isdisabled; } -function URLFieldHandler() { - var field_attachurl = document.getElementById("attachurl"); +function TextFieldHandler() { + var field_text = document.getElementById("attach_text"); var greyfields = new Array("data", "ispatch", "autodetect", "list", "manual", "contenttypeselection", "contenttypeentry"); var i, thisfield; - if (field_attachurl.value.match(/^\s*$/)) { + if (field_text.value.match(/^\s*$/)) { for (i = 0; i < greyfields.length; i++) { thisfield = document.getElementById(greyfields[i]); if (thisfield) { @@ -78,7 +78,7 @@ function URLFieldHandler() { function DataFieldHandler() { var field_data = document.getElementById("data"); - var greyfields = new Array("attachurl"); + var greyfields = new Array("attach_text"); var i, thisfield; if (field_data.value.match(/^\s*$/)) { for (i = 0; i < greyfields.length; i++) { @@ -102,9 +102,9 @@ function clearAttachmentFields() { document.getElementById('data').value = ''; DataFieldHandler(); - if ((element = document.getElementById('attachurl'))) { + if ((element = document.getElementById('attach_text'))) { element.value = ''; - URLFieldHandler(); + TextFieldHandler(); } document.getElementById('description').value = ''; /* Fire onchange so that the disabled state of the content-type |