[bugs] [Bug 1076] New - Javascript error in selection stuff in
mailbox
bugs at bugs.horde.org
bugs@bugs.horde.org
Tue Oct 15 01:57:55 PDT 2002
http://bugs.horde.org/show_bug.cgi?id=1076
*** shadow/1076 Mon Oct 14 21:57:55 2002
--- shadow/1076.tmp.10260 Mon Oct 14 21:57:55 2002
***************
*** 0 ****
--- 1,61 ----
+ Bug#: 1076
+ Product: Horde
+ Version: 2.1 Unstable
+ Platform: All Browsers
+ OS/Version: Linux
+ Status: NEW
+ Resolution:
+ Severity: normal
+ Priority: P2
+ Component: IMP
+ Area: BUILD
+ AssignedTo: chuck@horde.org
+ ReportedBy: peter@eluks.com
+ URL:
+ Summary: Javascript error in selection stuff in mailbox
+
+ If a mailbox is empty and a user select "Select:" and then makes a selection
+ say 'All' it will bring up a javascript error because there is it tries to
+ access a non existent item. I modified the function makeSelection slightly to
+ check if there is anything in the mailbox before it does anything. A patch is
+ down below
+
+ -Peter Kieltyka
+
+ IN FILE:
+
+ /horde/imp/templates/mailbox/javascript.inc
+
+ CHANGE makeSelection FUNCTION TO:
+
+ function makeSelection(whichForm)
+ {
+ var isOk = 0;
+
+ if (whichForm == 1) {
+ flag = document.select1.filter.options
+ [document.select1.filter.selectedIndex].value;
+ } else {
+ flag = document.select2.filter.options
+ [document.select2.filter.selectedIndex].value;
+ }
+
+ for (i = 0; i < document.messages.elements.length; i++) {
+ if (document.messages.elements[i].name == 'indices[]') isOk = 1;
+ }
+
+ if (isOk == 1) {
+ if (flag.substring(0, 1) == "!") {
+ selectFlagged(parseInt(flag.substring(1)), false);
+ } else {
+ selectFlagged(parseInt(flag), true);
+ }
+ }
+
+ // reset the form
+ if (whichForm == 1) {
+ document.select1.reset();
+ } else {
+ document.select2.reset();
+ }
+ }
More information about the bugs
mailing list