Changeset 7045


Ignore:
Timestamp:
04/01/10 21:49:44 (23 months ago)
Author:
RaulFRodriguez
Message:

Item8677: implementing the changes in the Release branch version of JSCalendarContrib

Note: changes implemented from scratch, and not by pushing the changes from Trunk here,
since according to Tasks.Item2111, Tasks.Item8235 (and Support.Question252) the versions
of JSCalendarContrib existing in Trunk and in Release branch are incompatible

  • 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

  • fixing foswiki_src.js in the same manner
  • in JSCalendarContrib.txt: adding a short section "Using the Calendar for picking dates only or picking times and dates" to the documentation
  • adding a reference in EditTablePlugin documentation

to the place in JSCalendarContrib documentation where the time and date DHTML format is described
the link is to an anchor #FormatSpecifiers in the relevant JSCalendarContrib section so that
the user lands directly where needed

  • updating Change History and Release date
Location:
branches/Release01x00
Files:
5 edited

Legend:

Unmodified
Added
Removed
  • branches/Release01x00/EditTablePlugin/data/System/EditTablePlugin.txt

    r6268 r7045  
    4141The =date= field type allows one to choose a date with a popup calendar. Popup calendar works with all modern browsers. The date picker button is inactive if the browser cannot support the popup calendar or if javascript is disabled.  
    4242 
     43The optional DHTML date format specifiers are described in the [[System.JSCalendarContrib#FormatSpecifiers][JSCalendarContrib]] documentation. When time spec 
     44ifiers are used, the calendar allows one to choose a date and a time. 
    4345 
    4446---++ Per Cell Settings 
  • branches/Release01x00/JSCalendarContrib/data/System/JSCalendarContrib.txt

    r5987 r7045  
    2222---++ Detailed Documentation 
    2323%$POD% 
     24 
     25---+++ Using the Calendar for picking dates only or picking times and dates 
     26The calendar is able to display a time-picker, in addition to the default date-picker, depending on the optional date format passed. 
     27 
     28   * the calendar displays the built-in time picker when the passed format descriptions includes hours, minutes or am or pm specifiers (i.e.: =%H, %I, %k, %l, %M, %p, %P=), 
     29 
     30   * otherwise the calendar is displayed normally with only dates if anything else or no format description is passed. 
    2431 
    2532---+++ Using the Calendar in user forms 
     
    5764|  Release: | %$RELEASE% | 
    5865| Change History: | | 
     66|  01 Apr 2010 | Calendar displays the built-in Time-Picker if the optional format string contains time format specifiers (Foswiki:Main.RaulFRodriguez) | 
    5967|  09 Jan 2010 | Adding the Config.spec file with the 3 settings so that people do not have to manually create the file. | 
    6068|  20 Sep 2009 | Small documentation update in connection with release of Foswiki 1.0.7 | 
  • branches/Release01x00/JSCalendarContrib/lib/Foswiki/Contrib/JSCalendarContrib.pm

    r5987 r7045  
    1919 
    2020$VERSION = '$Rev$'; 
    21 $RELEASE = '09 Jan 2010'; 
     21$RELEASE = '01 Apr 2010'; 
    2222$SHORTDESCRIPTION = "[[http://dynarch.com/mishoo/calendar.epl][Mishoo JSCalendar]], packaged for use by plugins, skins and add-ons"; 
    2323 
     
    148148The first parameter to =showCalendar= is the id of the textfield, and the second parameter is the date format. Default format is '%e %B %Y'. 
    149149 
     150#FormatSpecifiers 
    150151All available date specifiers: 
    151152<verbatim> 
  • branches/Release01x00/JSCalendarContrib/pub/System/JSCalendarContrib/foswiki.js

    r984 r7045  
    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;} 
  • branches/Release01x00/JSCalendarContrib/pub/System/JSCalendarContrib/foswiki_src.js

    r984 r7045  
    1818                _dynarch_popupCalendar = null; 
    1919            }); 
    20         cal.showsTime = false; 
     20        if (format.search(/%H|%I|%k|%l|%M|%p|%P/)!=-1) { 
     21            cal.showsTime=true; 
     22        } else { 
     23            cal.showsTime=false; 
     24        } 
    2125        cal.showsOtherMonths = true; 
    2226        _dynarch_popupCalendar = cal; 
Note: See TracChangeset for help on using the changeset viewer.