Changeset 7019


Ignore:
Timestamp:
04/01/10 00:29:47 (23 months ago)
Author:
RaulFRodriguez
Message:

Item8677: fixing foswiki.js of JSCalendarContrib not to hardcode showsTime
Setting showsTime=false or showsTime=true depending on whether or not the format string contains time specifiers
Using the following time specifers as triggers: %H|%I|%k|%l|%M|%p|%P
Do so preserving the original formatting of the Javascript code

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/JSCalendarContrib/pub/System/JSCalendarContrib/foswiki.js

    r984 r7019  
    11function showCalendar(id,format){var el=document.getElementById(id);if(_dynarch_popupCalendar!=null){_dynarch_popupCalendar.hide();}else{var cal=new Calendar(1,null,function(cal,date){cal.sel.value=date;if(cal.sel.onchange!=null) 
    22cal.sel.onchange();if(cal.dateClicked) 
    3 cal.callCloseHandler();},function(cal){cal.hide();_dynarch_popupCalendar=null;});cal.showsTime=false;cal.showsOtherMonths=true;_dynarch_popupCalendar=cal;cal.setRange(1900,2070);cal.create();} 
     3cal.callCloseHandler();},function(cal){cal.hide();_dynarch_popupCalendar=null;});if(format.search(/%H|%I|%k|%l|%M|%p|%P/)!=-1){cal.showsTime=true;}else{cal.showsTime=false;}cal.showsOtherMonths=true;_dynarch_popupCalendar=cal;cal.setRange(1900,2070);cal.create();} 
    44_dynarch_popupCalendar.setDateFormat(format);_dynarch_popupCalendar.parseDate(el.value);_dynarch_popupCalendar.sel=el;_dynarch_popupCalendar.showAtElement(el,"Br");return false;} 
Note: See TracChangeset for help on using the changeset viewer.