[Bps-public-commit] rt-extension-jsgantt branch, passthrough-all-jsgantt-options, created. 1.00-2-gfe3deb1
Todd Wade
todd at bestpractical.com
Wed Oct 29 13:15:16 EDT 2014
The branch, passthrough-all-jsgantt-options has been created
at fe3deb122d9a6bc358903b3c5f96ab875bdfdadd (commit)
- Log -----------------------------------------------------------------
commit fe3deb122d9a6bc358903b3c5f96ab875bdfdadd
Author: Todd Wade <todd at bestpractical.com>
Date: Wed Oct 29 13:12:11 2014 -0400
allow all JSGantt options to be configured via RT config
Pass through all available JSGantt.GanttChart config options from
RT_SiteConfig.pm to the JSGantt.GanttChart instance in JSGantt.html
diff --git a/README b/README
index 1022494..95fb598 100644
--- a/README
+++ b/README
@@ -35,6 +35,15 @@ CONFIGURATION
ShowProgress => 1,
ShowDuration => 1,
+ # Configurable JSGantt options
+ # https://code.google.com/p/jsgantt/wiki/Documentation#4._Instantiate_JSGantt_using_()
+ # CaptionType => 'Resource',
+ # ShowStartDate => 1,
+ # ShowEndDate => 1,
+ # DateInputFormat => 'mm/dd/yyyy',
+ # DateDisplayFormat => 'mm/dd/yyyy',
+ # FormatArr => q|'day','week','month','quarter'|,
+
# define your own color scheme:
# ColorScheme => ['ff0000', 'ffff00', 'ff00ff', '00ff00', '00ffff', '0000ff'],
diff --git a/html/Search/JSGantt.html b/html/Search/JSGantt.html
index 3234a11..1ef4172 100644
--- a/html/Search/JSGantt.html
+++ b/html/Search/JSGantt.html
@@ -64,9 +64,12 @@
g.setShowRes(<% $options{'ShowOwner'}? 1 : 0 %>);
g.setShowDur(<% $options{'ShowDuration'}? 1 : 0 %> );
g.setShowComp(<% $options{'ShowProgress'} ? 1 : 0 %> );
-
- g.setCaptionType('Resource'); // Set to Show Caption (None,Caption,Resource,Duration,Complete)
-
+ g.setCaptionType('<% $options{'CaptionType'} or 'Resource' %>'); // Set to Show Caption (None,Caption,Resource,Duration,Complete)
+ g.setShowStartDate(<% defined $options{'ShowStartDate'} ? $options{'ShowStartDate'} : 1 %>); // Show/Hide Start Date(0/1)
+ g.setShowEndDate(<% defined $options{'ShowEndDate'} ? $options{'ShowEndDate'} : 1 %>); // Show/Hide End Date(0/1)
+ g.setDateInputFormat('<% $options{'DateInputFormat'} or 'mm/dd/yyyy' %>') // Set format of input dates ('mm/dd/yyyy', 'dd/mm/yyyy', 'yyyy-mm-dd')
+ g.setDateDisplayFormat('<% $options{'DateDisplayFormat'} or 'mm/dd/yyyy' %>');
+ g.setFormatArr(<% $options{'FormatArr'} or q!'day','week','month','quarter'! | n %>) // Set format options (up to 4 : "minute","hour","day","week","month","quarter")
//var gr = new Graphics();
diff --git a/lib/RT/Extension/JSGantt.pm b/lib/RT/Extension/JSGantt.pm
index 035fed1..d0c9fca 100644
--- a/lib/RT/Extension/JSGantt.pm
+++ b/lib/RT/Extension/JSGantt.pm
@@ -96,6 +96,15 @@ or add C<RT::Extension::JSGantt> to your existing C<@Plugins> line.
ShowProgress => 1,
ShowDuration => 1,
+ # Configurable JSGantt options
+ # https://code.google.com/p/jsgantt/wiki/Documentation#4._Instantiate_JSGantt_using_()
+ # CaptionType => 'Resource',
+ # ShowStartDate => 1,
+ # ShowEndDate => 1,
+ # DateInputFormat => 'mm/dd/yyyy',
+ # DateDisplayFormat => 'mm/dd/yyyy',
+ # FormatArr => q|'day','week','month','quarter'|,
+
# define your own color scheme:
# ColorScheme => ['ff0000', 'ffff00', 'ff00ff', '00ff00', '00ffff', '0000ff'],
-----------------------------------------------------------------------
More information about the Bps-public-commit
mailing list