NinjaCal

Under The Hood

NinjaCal.UnderTheHood History

Hide minor edits - Show changes to output

Changed lines 26-50 from:
!!Available script actions...

{ } are for optional parameters

: selectDate : params: datelist, {refocus}
->returns the selected date in $$__NinjaCalSelectedList

: selectRange : params: daterange; {refocus}
Note: range is either a quoted pair of ¶ separated dates or a single string with "..." separating start and end dates

: stepMonth: params: n

: goToDate: params: date

: clearDates: params: (none)

'''Examples'''

* To select a single date:
@@Perform Script [ “NinjaCal ( action ; params )”; Parameter: "selectDate¶" & Get(CurrentDate) ]@@

*To change the focus of the calendar to a date such as "2/10/2009" (without selecting)
[@Perform Script [ “NinjaCal ( action ; params )”; Parameter: "goToDate¶" & "2/10/2009" ]@]


to:
(:include ScriptActions:)


Changed lines 18-20 from:
!! NinjaCal ( action ; params ) script
This script controls all selection and de-selection behaviors--it sets the $$__NinjaCalBaseDate and $$__NinjaCalSelectedList global variables.
to:
!! The "NinjaCal ( action ; params )" Script
This script controls all selection and de-selection behaviors: it sets the $$__NinjaCalBaseDate and $$__NinjaCalSelectedList global variables.
Changed lines 24-26 from:
Basic syntax is to call the "NinjaCal ( action ; params )" script, and pass it a valid action and the parameters for the action. Parameters are value delimited "¶", so multi-value parameters need to be passed as quoted list. See examples below:

!!Available script
actions;
to:
Basic syntax is to call the "NinjaCal ( action ; params )" script, and pass it a valid action and the parameters for the action. Parameters separated by carriage returns (these things in FileMaker's calcs: "¶"), so multi-value parameters need to be passed as quoted list. See examples below:

!!Available script
actions...
Changed lines 8-9 from:
The logic that drives the calendar widget (the grid thingy) is contained in a single field, @@NinjaCalDisp@@. This is a repeating calculation field. Each calendar widget is made up of 42 of these NinjaCalDisp repetitions (cells).
to:
The logic that drives the calendar widget (the grid thingy) is contained in a single field, "NinjaCal_basic" (or "NinjaCal_tripple" if you're using the 3-month widget). This is a repeating calculation field. Each calendar widget is made up of 42 of these NinjaCal_basic repetitions (cells).
Changed lines 11-12 from:
The NinjaCalDisp field will automatically determine the month in focus by looking at the date values stored in the file global $$__NinjaCalBaseDate. NinjaCalDisp defaults to the current date (today) if $$__NinjaCalBaseDate is empty or not valid.
to:
The NinjaCal_basic field will automatically determine the month in focus by looking at the date values stored in the file global $$__NinjaCalBaseDate. NinjaCal_basic defaults to the current date (today) if $$__NinjaCalBaseDate is empty or not valid.
Changed lines 16-17 from:
Tip: You can create your own calculation fields that derive values from  $$__NinjaCalSelectedList.
to:
Tip: You can create your own calculation fields that derive values from $$__NinjaCalSelectedList.
Changed lines 5-6 from:
%center% %width=500px% http://www.seedcode.com/rootimages/stikipad/ninjadiag.png
to:
%center% http://www.seedcode.com/rootimages/stikipad/ninjadiag.png
Changed lines 5-6 from:
Attach:ninjacal_diagram | NinjaCal Diagram
to:
%center% %width=500px% http://www.seedcode.com/rootimages/stikipad/ninjadiag.png
Changed line 10 from:
!!Date/Month in focus
to:
!!!!Date/Month in focus
Changed line 18 from:
!!! NinjaCal ( action ; params ) script
to:
!! NinjaCal ( action ; params ) script
Changed lines 21-23 from:
IMPORTANT: Copy this script into your solution BEFORE any calendar widgets.

!!! Other uses of the NinjaCal controller script
to:
IMPORTANT: Copy this script into your solution BEFORE pasting in any calendar widgets.

!!!! Other uses of the NinjaCal controller script
Changed line 26 from:
!!!!Available script actions;
to:
!!Available script actions;
Changed lines 49-56 from:
!!Integration Notes
Many ways to integrate. Simplest way is:
# Import the NinjaCal table (File > Manage Database > Tables > Import )
# Create a cartesian product from your desired target TO to the imported NinjaCal TO
# Import the NinjaCal script
# Copy and paste the NinjaCal widget into your layout

to:
Changed lines 1-2 from:
!!!The Theory Behind Integrating NinjaCal
to:
!!The Theory Behind Integrating NinjaCal
Deleted lines 4-5:

!!Under the hood
Changed line 7 from:
!!! The Calendar Widget
to:
!! The Calendar Widget
Changed line 10 from:
!!!!Date/Month in focus
to:
!!Date/Month in focus
Changed lines 1-7 from:
!!Developer Notes
NinjaCal by Proof is a rich, lightweight and fully unlocked calendar-date selection interface that is designed
to be easily incorporated into any existing FileMaker 9+ solution.

NinjaCal's calendar widget is developed entirely with native FileMaker 9 elements. There are no special plugins or custom functions. All effects are accomplished through the judicious use of conditional formatting and calculations
.

NinjaCal is fast! (Hiyah!!) NinjaCal is nimble. NinjaCal uses clever FileMaker-fu so that you don't have to. Just copy and paste.

to:
!!!The Theory Behind Integrating NinjaCal

Since NinjaCal uses global variables to store its results, we do not have
to worry about defining fields or records. The NinjaCal script can be access from any context. As long as you have access to the the NinjaCalDisp field from your desired context, NinjaCal should 'just work'.

Changed lines 58-60 from:
!!!The Theory Behind Integrating NinjaCal
Since NinjaCal uses global variables to store its results, we do not have to worry about defining fields or records. The NinjaCal script can be access from any context. As long as you have access to the the NinjaCalDisp field from your desired context, NinjaCal should 'just work'.

to:
Added lines 1-62:
!!Developer Notes
NinjaCal by Proof is a rich, lightweight and fully unlocked calendar-date selection interface that is designed to be easily incorporated into any existing FileMaker 9+ solution.

NinjaCal's calendar widget is developed entirely with native FileMaker 9 elements. There are no special plugins or custom functions. All effects are accomplished through the judicious use of conditional formatting and calculations.

NinjaCal is fast! (Hiyah!!) NinjaCal is nimble. NinjaCal uses clever FileMaker-fu so that you don't have to. Just copy and paste.

!!Under the hood
Attach:ninjacal_diagram | NinjaCal Diagram

!!! The Calendar Widget
The logic that drives the calendar widget (the grid thingy) is contained in a single field, @@NinjaCalDisp@@. This is a repeating calculation field. Each calendar widget is made up of 42 of these NinjaCalDisp repetitions (cells).

!!!!Date/Month in focus
The NinjaCalDisp field will automatically determine the month in focus by looking at the date values stored in the file global $$__NinjaCalBaseDate. NinjaCalDisp defaults to the current date (today) if $$__NinjaCalBaseDate is empty or not valid.

!!!!Calendar Highlights
The calendar widget will highlight any dates found in $$__NinjaCalSelectedList. Anytime a date is selected, that selected date or list of dates are stored in $$__NinjaCalSelectedList.

Tip: You can create your own calculation fields that derive values from  $$__NinjaCalSelectedList.

!!! NinjaCal ( action ; params ) script
This script controls all selection and de-selection behaviors--it sets the $$__NinjaCalBaseDate and $$__NinjaCalSelectedList global variables.

IMPORTANT: Copy this script into your solution BEFORE any calendar widgets.

!!! Other uses of the NinjaCal controller script
Basic syntax is to call the "NinjaCal ( action ; params )" script, and pass it a valid action and the parameters for the action. Parameters are value delimited "¶", so multi-value parameters need to be passed as quoted list. See examples below:

!!!!Available script actions;
{ } are for optional parameters

: selectDate : params: datelist, {refocus}
->returns the selected date in $$__NinjaCalSelectedList

: selectRange : params: daterange; {refocus}
Note: range is either a quoted pair of ¶ separated dates or a single string with "..." separating start and end dates

: stepMonth: params: n

: goToDate: params: date

: clearDates: params: (none)

'''Examples'''

* To select a single date:
@@Perform Script [ “NinjaCal ( action ; params )”; Parameter: "selectDate¶" & Get(CurrentDate) ]@@

*To change the focus of the calendar to a date such as "2/10/2009" (without selecting)
[@Perform Script [ “NinjaCal ( action ; params )”; Parameter: "goToDate¶" & "2/10/2009" ]@]

!!Integration Notes
Many ways to integrate. Simplest way is:
# Import the NinjaCal table (File > Manage Database > Tables > Import )
# Create a cartesian product from your desired target TO to the imported NinjaCal TO
# Import the NinjaCal script
# Copy and paste the NinjaCal widget into your layout

!!!The Theory Behind Integrating NinjaCal
Since NinjaCal uses global variables to store its results, we do not have to worry about defining fields or records. The NinjaCal script can be access from any context. As long as you have access to the the NinjaCalDisp field from your desired context, NinjaCal should 'just work'.

(855) SEEDCODE
[email protected]
Follow us: