Summary | javascript for Horde_Form_Type_assign broken |
Queue | Horde Framework Packages |
Queue Version | HEAD |
Type | Bug |
State | Resolved |
Priority | 1. Low |
Owners | chuck (at) horde (dot) org |
Requester | dorm (at) dorm (dot) org |
Created | 04/05/2006 (7029 days ago) |
Due | |
Updated | 04/23/2006 (7011 days ago) |
Assigned | 04/08/2006 (7026 days ago) |
Resolved | 04/23/2006 (7011 days ago) |
Github Issue Link | |
Github Pull Request | |
Milestone | |
Patch | No |
State ⇒ Resolved
New Attachment: assign[1].php
need to call getInfo() for that to work properly. Also, the assign
type isn't set up right now to preserve keys. See the attached...
New Attachment: assign.php
I actually am no longer using the assign field type, either, but I
kept the code around for testing/verification of this bug.
I've stripped out most of the application-specific stuff from it, but
it is enough that you see how I'm setting up the assign variable.
Summary ⇒ javascript for Horde_Form_Type_assign broken
instance of the assign type being used, and it's in Occam, which I
don't have set up. I'll get to it eventually if you can't, but code
would help me out. Thanks!
incorrect var names. I think this should do it:
--- form_assign.js.1.4 2006-04-20 11:10:48.419915568 -0600
+++ form_assign.js 2006-04-20 10:37:39.825227912 -0600
@@ -47,7 +47,7 @@
}
}
- this.setField(name);
+ this.setField(form, elt);
}
Horde_Form_Assign.setField = function(form, elt)
@@ -79,5 +79,5 @@
if (hit) {
values = values.substring(0, values.length - 1);
}
- document[name + '__values'].value = values;
+ document.forms[form].elements[elt + '__values'].value = values;
}
Also, the display of the assign field is not correctly maintained
across form submissions. I'm not sure the __value element is
correctly being parsed into the leftValues and rightValues arrays.
http://cvs.horde.org/diff.php?r1=1.3&r2=1.4&f=horde%2Fjs%2Fsrc%2Fform_assign.js
Error: missing formal parameter at 'var'
This happens in Safari and Mac Firefox. I will check on Windows
browsers tomorrow.
http://lists.horde.org/archives/cvs/Week-of-Mon-20060403/056494.html
If it checks out I'll merge it to Horde 3.1.2.
State ⇒ Feedback
would make more sense to pass the form and field name separately to
the function. It's kind of awkward to concatenate them in the PHP code
first, only to split them later in the js code.
New Attachment: form_assign.js.1.2.10.4[1].patch
Priority ⇒ 1. Low
State ⇒ Unconfirmed
New Attachment: form_assign.js.1.2.10.4.patch
Queue ⇒ Horde Framework Packages
Summary ⇒ javascript for 'assign' type Horde_Form elements broken
Type ⇒ Bug
options back and forth between the two select lists for Horde_Form
'assign' elements.
I've verified this behavior in Windows Firefox and IE. I will check
on MacOS Firefox and Safari when I get home and will update.
The current code obtains the form element objects through the
document[] array, which doesn't work.
I've attached a patch which obtains the objects through the
document.forms[...].elements[...] array(s). It first splits the
'name' parater to separate the form and select element names.
This patched code works on Windows Firefox and IE, and I will verify
on MacOS Firefox and Safari.