Scarab commit: svn commit: r10965 - branches/release/0.22/src/webapp/scripts/CalendarPopup.js
Johannes Höchstädter <[email protected]>
| Newsgroups | gmane.comp.java.scarab.cvs |
|---|---|
| Message-ID | <[email protected]> |
Author: jhoech
Date: 2010-03-19 06:33:49-0700
New Revision: 10965
Modified:
branches/release/0.22/src/webapp/scripts/CalendarPopup.js
Log:
FIX - Issue SCB3035: Added quick fix from Matt Kruse (author of popup calendar, see http://www.mattkruse.com/javascript/calendarpopup/) which adds a method for stopping event "onmouseup" for drop downs in calendar popup. Now month and year are selectable again in calendar popup, without closing popup immediately.
Modified: branches/release/0.22/src/webapp/scripts/CalendarPopup.js
Url: http://scarab.tigris.org/source/browse/scarab/branches/release/0.22/src/webapp/scripts/CalendarPopup.js?view=diff&pathrev=10965&r1=10964&r2=10965
==============================================================================
--- branches/release/0.22/src/webapp/scripts/CalendarPopup.js (original)
+++ branches/release/0.22/src/webapp/scripts/CalendarPopup.js 2010-03-19 06:33:49-0700
@@ -994,6 +994,9 @@
*/
+// Quick fix for FF3
+function CP_stop(e) { if (e && e.stopPropagation) { e.stopPropagation(); } }
+
// CONSTRUCTOR for the CalendarPopup Object
function CalendarPopup() {
var c;
@@ -1319,7 +1322,7 @@
var refresh = windowref+'CP_refreshCalendar';
var refreshLink = 'javascript:' + refresh;
if (this.isShowNavigationDropdowns) {
- result += '<TD CLASS="'+this.cssPrefix+'cpMonthNavigation" WIDTH="78" COLSPAN="3"><select CLASS="'+this.cssPrefix+'cpMonthNavigation" name="cpMonth" onChange="'+refresh+'('+this.index+',this.options[this.selectedIndex].value-0,'+(year-0)+');">';
+ result += '<TD CLASS="'+this.cssPrefix+'cpMonthNavigation" WIDTH="78" COLSPAN="3"><select CLASS="'+this.cssPrefix+'cpMonthNavigation" name="cpMonth" onmouseup="CP_stop(event)" onChange="'+refresh+'('+this.index+',this.options[this.selectedIndex].value-0,'+(year-0)+');">';
for( var monthCounter=1; monthCounter<=12; monthCounter++ ) {
var selected = (monthCounter==month) ? 'SELECTED' : '';
result += '<option value="'+monthCounter+'" '+selected+'>'+this.monthNames[monthCounter-1]+'</option>';
@@ -1327,7 +1330,7 @@
result += '</select></TD>';
result += '<TD CLASS="'+this.cssPrefix+'cpMonthNavigation" WIDTH="10"> </TD>';
- result += '<TD CLASS="'+this.cssPrefix+'cpYearNavigation" WIDTH="56" COLSPAN="3"><select CLASS="'+this.cssPrefix+'cpYearNavigation" name="cpYear" onChange="'+refresh+'('+this.index+','+month+',this.options[this.selectedIndex].value-0);">';
+ result += '<TD CLASS="'+this.cssPrefix+'cpYearNavigation" WIDTH="56" COLSPAN="3"><select CLASS="'+this.cssPrefix+'cpYearNavigation" name="cpYear" onmouseup="CP_stop(event)" onChange="'+refresh+'('+this.index+','+month+',this.options[this.selectedIndex].value-0);">';
for( var yearCounter=year-this.yearSelectStartOffset; yearCounter<=year+this.yearSelectStartOffset; yearCounter++ ) {
var selected = (yearCounter==year) ? 'SELECTED' : '';
result += '<option value="'+yearCounter+'" '+selected+'>'+yearCounter+'</option>';
------------------------------------------------------
http://scarab.tigris.org/ds/viewMessage.do?dsForumId=3577&dsMessageId=2462158