rem: if (rule.count == -1) { setElementValue("recurrence-duration", "forever"); } else if (rule.isByCount) { setElementValue("recurrence-duration", "ntimes"); setElementValue("repeat-ntimes-count", rule.count ); 
add: if (rule.isByCount) { if (rule.count == -1) { setElementValue("recurrence-duration", "forever"); } else { setElementValue("recurrence-duration", "ntimes"); setElementValue("repeat-ntimes-count", rule.count ); } 
context: function loadDialog(){    if (!window.originalRecurrenceInfo)        return;    /* split out rules and exceptions */    var rrules = splitRecurrenceRules(window.originalRecurrenceInfo);    var rules = rrules[0];    var exceptions = rrules[1];    /* deal with the rules */    if (rules.length > 0) {        // we only handle 1 rule currently        var rule = rules[0];        if (rule instanceof calIRecurrenceRule) {            switch(rule.type) {            case "DAILY":                document.getElementById("period-list").selectedIndex = 0;                setElementValue("daily-days", rule.interval);                break;            case "WEEKLY":                document.getElementById("period-list").selectedIndex = 1;                const byDayTable = { 1 : "sun", 2 : "mon", 3 : "tue", 4 : "wed",                                     5 : "thu", 6 : "fri", 7: "sat" };                for each (var i in rule.getComponent("BYDAY", {})) {                    setElementValue("weekly-" + byDayTable[i], "true", "checked");                }                break;            case "MONTHLY":                document.getElementById("period-list").selectedIndex = 2;                break;            case "YEARLY":                document.getElementById("period-list").selectedIndex = 3;                break;            default:                dump("unable to handle your rule type!\n");                break;            }            /* load up the duration of the event radiogroup */            if (rule.count == -1) {                setElementValue("recurrence-duration", "forever");            } else if (rule.isByCount) {                setElementValue("recurrence-duration", "ntimes");                setElementValue("repeat-ntimes-count", rule.count );            } else {                setElementValue("recurrence-duration", "until");                setElementValue("repeat-until-date", rule.endDate.jsDate); // XXX getInTimezone()            }                }    }    /* Deal with exceptions */    var exceptionListBox = document.getElementById("recurrence-exceptions-listbox");    for each (exception in exceptions) {        if (exception instanceof calIRecurrenceDate) {            exceptionListBox.appendItem(exception.date.toString()).date = exception.date;        } else if (exception instanceof calIRecurrenceDateSet) {            var dateSet = exception.getDates({});            for each(date in dateSet)                exceptionListBox.appendItem(date.toString()).date = date;        } else            dump(exception);    }}
meta: 8395	/local1/tlutelli/issta_data/temp/all_js/javascript/2006_temp/2006/8395/6ae9bda125074c46a1f2f1ed26f14f6e55aedacb/calendar-recurrence-dialog.js/buggy/calendar/base/content/calendar-recurrence-dialog.js