From: Rod Roark Date: Thu, 24 Jan 2013 16:19:39 +0000 (-0800) Subject: Two cosmetic fixes for the event editor. X-Git-Tag: whats-been-changed~443 X-Git-Url: https://repo.or.cz/w/openemr.git/commitdiff_plain/1eb97a12ed88193199440e5b27ecf03bc26cfd58 Two cosmetic fixes for the event editor. --- diff --git a/interface/main/calendar/add_edit_event.php b/interface/main/calendar/add_edit_event.php index 19c1257d3..da48b4121 100644 --- a/interface/main/calendar/add_edit_event.php +++ b/interface/main/calendar/add_edit_event.php @@ -967,7 +967,6 @@ td { font-size:0.8em; } if (occur < 4) { // 5th is not allowed nthtext = occurNames[occur] + ' ' + downame; } - f.form_repeat_type.options[5].text = nthtext; var lasttext = ''; var tmp = new Date(d.getUTCFullYear(), d.getUTCMonth() + 1, 0); if (tmp.getUTCDate() - d.getUTCDate() < 7) { @@ -975,7 +974,12 @@ td { font-size:0.8em; } // so permit that as an option. lasttext = ' ' + downame; } - f.form_repeat_type.options[6].text = lasttext; + var si = f.form_repeat_type.selectedIndex; + var opts = f.form_repeat_type.options; + opts.length = 5; // remove any nth and Last entries + if (nthtext ) opts[opts.length] = new Option(nthtext , '5'); + if (lasttext) opts[opts.length] = new Option(lasttext, '6'); + if (si < opts.length) f.form_repeat_type.selectedIndex = si; } // This is for callback by the find-available popup. @@ -1367,7 +1371,7 @@ if ($GLOBALS['select_multi_providers']) { // See common.api.php for these. Options 5 and 6 will be dynamically filled in // when the start date is set. foreach (array(0 => xl('day') , 4 => xl('workday'), 1 => xl('week'), 2 => xl('month'), 3 => xl('year'), - 5 => '', 6 => '') as $key => $value) + 5 => '?', 6 => '?') as $key => $value) { echo "