Hello,
The time registration form had an annoying habit of selecting the
first activity by default. This leaded to several misassigned
activities which went mostly unnoticed.
The following patch fixes the problem by inserting an invalid entry
in the selection box.
Thank you for developing Achievo!
--- modules/project/attributes/class.projectphaseattrib.inc.orig 2004-12-13 11:10:05.945609635 +0100
+++ modules/project/attributes/class.projectphaseattrib.inc 2004-12-13 11:10:10.378919602 +0100
dot
var somethingselected=false;
+ options[0] = new Option("---",0);
if (projectid!=0)
{
-
for(var i=0;i<activityarray[projectindex].count;i++)
{
- options[i] = new Option(activityarray[projectindex][i].actname,activityarray[projectindex][i].actid);
+ options[i+1] = new Option(activityarray[projectindex][i].actname,activityarray[projectindex][i].actid);
if (activityarray[projectindex][i].actid == selectedactivityid)
{
- options[i].selected=true;
- document.entryform.activityid.options.selectedIndex=i;
+ options[i+1].selected=true;
+ document.entryform.activityid.options.selectedIndex=i+1;
somethingselected = true;
}
}
}
- else
- {
- options[0] = new Option("'.text("firstselectproject").'",0);
- }
if (!somethingselected) options[0].selected=true;
}
}
--
// Bernardo Innocenti - Develer S.r.l., R&D dept.
\X/ http://www.develer.com/