[Bps-public-commit] rt-extension-jsgantt branch, remove-datedaybeforemonth-option, created. 1.01-2-gb95586d
Todd Wade
todd at bestpractical.com
Wed Dec 10 13:52:04 EST 2014
The branch, remove-datedaybeforemonth-option has been created
at b95586d821beb5cd2a154726ca4417ca2889239a (commit)
- Log -----------------------------------------------------------------
commit b95586d821beb5cd2a154726ca4417ca2889239a
Author: Todd Wade <todd at bestpractical.com>
Date: Wed Dec 10 13:39:03 2014 -0500
remove DateDayBeforeMonth option
Remove undocumented config option that was made redundant via the
passthrough-all-jsgantt-options branch. Recommended by cloos at:
https://github.com/bestpractical/rt-extension-jsgantt/commit/fe3deb122d9a6bc358903b3c5f96ab875bdfdadd#comments
diff --git a/Changes b/Changes
index 029d2f9..b5a1578 100644
--- a/Changes
+++ b/Changes
@@ -1,3 +1,6 @@
+1.02 2014-10-29
+ - remove DateDayBeforeMonth config option made redundant by v1.01
+
1.01 2014-10-29
- Provide RT configuration options for JSGantt's options
diff --git a/html/NoAuth/js/jsgantt.js b/html/NoAuth/js/jsgantt.js
index 40556d8..e6dd90f 100755
--- a/html/NoAuth/js/jsgantt.js
+++ b/html/NoAuth/js/jsgantt.js
@@ -573,11 +573,7 @@ JSGantt.GanttChart = function(pGanttVar, pDiv, pFormat)
* @type String
* @default "mm/dd/yy"
* @private
-% if ( RT->Config->Get('DateDayBeforeMonth') ) {
-*/var vDateDisplayFormat = "dd/mm/yy";
-% } else {
*/var vDateDisplayFormat = "mm/dd/yy";
-% }
var vNumUnits = 0;
var vCaptionType;
@@ -1247,24 +1243,24 @@ Complete-Displays task percent complete</p>
if(vNxtDate <= vMaxDate) {
-% if ( RT->Config->Get('DateDayBeforeMonth') ) {
+ if ( vDateDisplayFormat.substring(0,2) == 'dd' ) {
vDateRowStr += '<td class="ghead" style="BORDER-TOP: #efefef 1px solid; FONT-SIZE: 12px; HEIGHT: 19px; BORDER-LEFT: #efefef 1px solid;" bgcolor=#' + vWeekdayColor + ' align=center width:'+vColWidth+'px><div style="width: '+vColWidth+'px">' + vTmpDate.getDate() + '/' + (vTmpDate.getMonth()+1) + '</div></td>';
-% } else {
+ } else {
vDateRowStr += '<td class="ghead" style="BORDER-TOP: #efefef 1px solid; FONT-SIZE: 12px; HEIGHT: 19px; BORDER-LEFT: #efefef 1px solid;" bgcolor=#' + vWeekdayColor + ' align=center width:'+vColWidth+'px><div style="width: '+vColWidth+'px">' + (vTmpDate.getMonth()+1) + '/' + vTmpDate.getDate() + '</div></td>';
-% }
+ }
if( vCurrDate >= vTmpDate && vCurrDate < vNxtDate )
vItemRowStr += '<td class="ghead" style="BORDER-TOP: #efefef 1px solid; FONT-SIZE: 12px; HEIGHT: 20px; BORDER-LEFT: #efefef 1px solid;" bgcolor=#' + vWeekdayColor + ' align=center><div style="width: '+vColWidth+'px">  </div></td>';
else
vItemRowStr += '<td class="ghead" style="BORDER-TOP: #efefef 1px solid; FONT-SIZE: 12px; HEIGHT: 20px; BORDER-LEFT: #efefef 1px solid;" align=center><div style="width: '+vColWidth+'px">  </div></td>';
} else {
-% if ( RT->Config->Get('DateDayBeforeMonth') ) {
+ if ( vDateDisplayFormat.substring(0,2) == 'dd' ) {
vDateRowStr += '<td class="ghead" style="BORDER-TOP: #efefef 1px solid; FONT-SIZE: 12px; HEIGHT: 19px; BORDER-LEFT: #efefef 1px solid; bgcolor=#' + vWeekdayColor + ' BORDER-RIGHT: #efefef 1px solid;" align=center width:'+vColWidth+'px><div style="width: '+vColWidth+'px">' + vTmpDate.getDate() + '/' + (vTmpDate.getMonth()+1) + '</div></td>';
-% } else {
+ } else {
vDateRowStr += '<td class="ghead" style="BORDER-TOP: #efefef 1px solid; FONT-SIZE: 12px; HEIGHT: 19px; BORDER-LEFT: #efefef 1px solid; bgcolor=#' + vWeekdayColor + ' BORDER-RIGHT: #efefef 1px solid;" align=center width:'+vColWidth+'px><div style="width: '+vColWidth+'px">' + (vTmpDate.getMonth()+1) + '/' + vTmpDate.getDate() + '</div></td>';
-% }
+ }
if( vCurrDate >= vTmpDate && vCurrDate < vNxtDate )
vItemRowStr += '<td class="ghead" style="BORDER-TOP: #efefef 1px solid; FONT-SIZE: 12px; HEIGHT: 20px; BORDER-LEFT: #efefef 1px solid; BORDER-RIGHT: #efefef 1px solid;" bgcolor=#' + vWeekdayColor + ' align=center><div style="width: '+vColWidth+'px">  </div></td>';
else
diff --git a/lib/RT/Extension/JSGantt.pm b/lib/RT/Extension/JSGantt.pm
index a4ffe8b..c6c6489 100644
--- a/lib/RT/Extension/JSGantt.pm
+++ b/lib/RT/Extension/JSGantt.pm
@@ -131,7 +131,7 @@ or add C<RT::Extension::JSGantt> to your existing C<@Plugins> line.
package RT::Extension::JSGantt;
-our $VERSION = '1.01';
+our $VERSION = '1.02';
use warnings;
use strict;
@@ -535,6 +535,21 @@ sub _ParentTicket {
return;
}
+=head1 UPGRADING
+
+=head2 DateDayBeforeMonth
+
+Prior to version 1.02, there was an undocumented RT config option
+C<DateDayBeforeMonth>. If you have DateDayBeforeMonth set in your RT, you can
+make JSGantt do the same thing by setting C<DateDisplayFormat> in
+RT_SiteConfig.pm:
+
+ Set(
+ %JSGanttOptions,
+ ...
+ # DateDisplayFormat => 'dd/mm/yyyy',
+ ...
+ );
=head1 AUTHOR
-----------------------------------------------------------------------
More information about the Bps-public-commit
mailing list