[Bps-public-commit] rt-extension-jsgantt branch, master, updated. 6ce4703e296d2344912422fda07492ed92139fc1

? sunnavy sunnavy at bestpractical.com
Thu Mar 31 03:19:50 EDT 2011


The branch, master has been updated
       via  6ce4703e296d2344912422fda07492ed92139fc1 (commit)
       via  5a90c5e4d6070c987fa12f9c19fa20c9a5fefeee (commit)
       via  fa2085ef4964a01af7bd6a5c2f24865529f834ec (commit)
       via  b06b892aa45be0fe95f9cc67792a3447edd7deec (commit)
       via  ceed524893e1237050d93e0f6eaff747a9da8b89 (commit)
       via  3dfadf6d5c9bec54c0f0ab3b40c5496cb0ebf07b (commit)
       via  70835a0fbcdebef984883786f75361ac8bf71026 (commit)
       via  bb6cd44a9cb71e10ae860d8d8e97f022bd2bf093 (commit)
       via  31b67d870af90eea73cc27384146d19c0b85af2d (commit)
      from  749af5d043007aa37af12afdb7e502443e0c1c10 (commit)

Summary of changes:
 Changes                                            |    5 +
 MANIFEST                                           |    3 +
 META.yml                                           |    2 +-
 etc/jsgantt.diff                                   |   93 ++++++++++
 html/Callbacks/JSGantt/Elements/Header/Head        |    2 +-
 .../LinksExtra => Elements/Tabs/Privileged}        |   26 ++--
 .../JSGantt/Search/Elements/ResultViews/AfterTools |    2 +-
 .../JSGantt/Ticket/Elements/ShowSummary/LinksExtra |    2 +-
 html/Search/JSGantt.html                           |   13 ++-
 inc/Module/Install/RTx.pm                          |   11 +-
 jsgantt.diff                                       |  185 --------------------
 lib/RT/Extension/JSGantt.pm                        |    4 +-
 12 files changed, 140 insertions(+), 208 deletions(-)
 create mode 100644 etc/jsgantt.diff
 copy html/Callbacks/JSGantt/{Ticket/Elements/ShowSummary/LinksExtra => Elements/Tabs/Privileged} (80%)
 delete mode 100644 jsgantt.diff

- Log -----------------------------------------------------------------
commit 31b67d870af90eea73cc27384146d19c0b85af2d
Author: sunnavy <sunnavy at bestpractical.com>
Date:   Mon Mar 28 14:56:43 2011 +0800

    update rtx

diff --git a/inc/Module/Install/RTx.pm b/inc/Module/Install/RTx.pm
index 5480124..726b3fb 100644
--- a/inc/Module/Install/RTx.pm
+++ b/inc/Module/Install/RTx.pm
@@ -8,7 +8,7 @@ no warnings 'once';
 
 use Module::Install::Base;
 use base 'Module::Install::Base';
-our $VERSION = '0.25';
+our $VERSION = '0.28';
 
 use FindBin;
 use File::Glob     ();
@@ -42,10 +42,10 @@ sub RTx {
         $INC{'RT.pm'} = "$RT::LocalPath/lib/RT.pm";
     } else {
         local @INC = (
-            @INC,
             $ENV{RTHOME} ? ( $ENV{RTHOME}, "$ENV{RTHOME}/lib" ) : (),
-            map { ( "$_/rt3/lib", "$_/lib/rt3", "$_/lib" ) } grep $_,
-            @prefixes
+            @INC,
+            map { ( "$_/rt4/lib", "$_/lib/rt4", "$_/rt3/lib", "$_/lib/rt3", "$_/lib" ) 
+                } grep $_, @prefixes
         );
         until ( eval { require RT; $RT::LocalPath } ) {
             warn
@@ -60,6 +60,7 @@ sub RTx {
     my $local_lib_path = "$RT::LocalPath/lib";
     print "Using RT configuration from $INC{'RT.pm'}:\n";
     unshift @INC, "$RT::LocalPath/lib" if $RT::LocalPath;
+    unshift @INC, $lib_path;
 
     $RT::LocalVarPath  ||= $RT::VarPath;
     $RT::LocalPoPath   ||= $RT::LocalLexiconPath;
@@ -189,4 +190,4 @@ sub RTxInit {
 
 __END__
 
-#line 303
+#line 304

commit bb6cd44a9cb71e10ae860d8d8e97f022bd2bf093
Author: sunnavy <sunnavy at bestpractical.com>
Date:   Thu Mar 31 14:19:32 2011 +0800

    make it happy with 4.0

diff --git a/html/Callbacks/JSGantt/Elements/Tabs/Privileged b/html/Callbacks/JSGantt/Elements/Tabs/Privileged
new file mode 100644
index 0000000..d948ffa
--- /dev/null
+++ b/html/Callbacks/JSGantt/Elements/Tabs/Privileged
@@ -0,0 +1,64 @@
+%# BEGIN BPS TAGGED BLOCK {{{
+%# 
+%# COPYRIGHT:
+%# 
+%# This software is Copyright (c) 1996-2009 Best Practical Solutions, LLC
+%#                                          <jesse at bestpractical.com>
+%# 
+%# (Except where explicitly superseded by other copyright notices)
+%# 
+%# 
+%# LICENSE:
+%# 
+%# This work is made available to you under the terms of Version 2 of
+%# the GNU General Public License. A copy of that license should have
+%# been provided with this software, but in any event can be snarfed
+%# from www.gnu.org.
+%# 
+%# This work is distributed in the hope that it will be useful, but
+%# WITHOUT ANY WARRANTY; without even the implied warranty of
+%# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+%# General Public License for more details.
+%# 
+%# You should have received a copy of the GNU General Public License
+%# along with this program; if not, write to the Free Software
+%# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+%# 02110-1301 or visit their web page on the internet at
+%# http://www.gnu.org/licenses/old-licenses/gpl-2.0.html.
+%# 
+%# 
+%# CONTRIBUTION SUBMISSION POLICY:
+%# 
+%# (The following paragraph is not intended to limit the rights granted
+%# to you to modify and distribute this software under the terms of
+%# the GNU General Public License and is only of importance to you if
+%# you choose to contribute your changes and enhancements to the
+%# community by submitting them to Best Practical Solutions, LLC.)
+%# 
+%# By intentionally submitting any modifications, corrections or
+%# derivatives to this work, or any other work intended for use with
+%# Request Tracker, to Best Practical Solutions, LLC, you confirm that
+%# you are the copyright holder for those contributions and you grant
+%# Best Practical Solutions,  LLC a nonexclusive, worldwide, irrevocable,
+%# royalty-free, perpetual, license to use, copy, create derivative
+%# works based on those contributions, and sublicense and distribute
+%# those contributions and any derivatives thereof.
+%# 
+%# END BPS TAGGED BLOCK }}}
+<%INIT>
+my $request_path = $HTML::Mason::Commands::r->path_info;
+
+my $query_string = sub {
+    my %args = @_;
+    my $u    = URI->new();
+    $u->query_form(%args);
+    return $u->query;
+};
+
+if ( $request_path =~ qr{^/Search/Results.html} ) {
+    my $tabs = PageMenu;
+    $tabs->child( 'gantt' => title => loc('Gantt Chart'),
+                    path => '/Search/JSGantt.html?Query=' .$m->request_args->{'Query'} );
+}
+
+</%INIT>
diff --git a/html/Search/JSGantt.html b/html/Search/JSGantt.html
index 230f65e..d8bf844 100644
--- a/html/Search/JSGantt.html
+++ b/html/Search/JSGantt.html
@@ -1,7 +1,15 @@
 <& /Elements/Header, Title => $title,
     Refresh => $session{'tickets_refresh_interval'} || RT->Config->Get('SearchResultsRefreshInterval', $session{'CurrentUser'} ),
     &>
+
+% if ( $RT::VERSION lt '3.9.6' ) {
 <& /Ticket/Elements/Tabs, Title => $title, Query => $ARGS{Query}, &>
+% } else {
+<& /Elements/Tabs &>
+%# this space is to make following elements a bit lower to avoid overlap
+%#  
+% }
+
 <div style="position:relative" class="gantt" id="GanttChartDIV"></div>
 <script>
 

commit 70835a0fbcdebef984883786f75361ac8bf71026
Author: sunnavy <sunnavy at bestpractical.com>
Date:   Thu Mar 31 14:58:30 2011 +0800

    JSGanttOptions maybe empty

diff --git a/html/Search/JSGantt.html b/html/Search/JSGantt.html
index d8bf844..57f84fe 100644
--- a/html/Search/JSGantt.html
+++ b/html/Search/JSGantt.html
@@ -60,7 +60,10 @@
 my $title = loc('JSGantt Results');
 my @Tickets;
 
-my %options = RT->Config->Get('JSGanttOptions');
+my %options;
+if ( RT->Config->Get('JSGanttOptions') ) {
+    %options = RT->Config->Get('JSGanttOptions');
+}
 if ( $Ticket ) {
     @Tickets = RT::Extension::JSGantt->AllRelatedTickets(
         Ticket     => $Ticket,

commit 3dfadf6d5c9bec54c0f0ab3b40c5496cb0ebf07b
Author: sunnavy <sunnavy at bestpractical.com>
Date:   Thu Mar 31 15:04:39 2011 +0800

    make dist contain jsgantt.diff too

diff --git a/jsgantt.diff b/etc/jsgantt.diff
similarity index 100%
rename from jsgantt.diff
rename to etc/jsgantt.diff

commit ceed524893e1237050d93e0f6eaff747a9da8b89
Author: sunnavy <sunnavy at bestpractical.com>
Date:   Thu Mar 31 15:07:02 2011 +0800

    clean jsgantt.diff

diff --git a/etc/jsgantt.diff b/etc/jsgantt.diff
index 72ebc01..f030968 100644
--- a/etc/jsgantt.diff
+++ b/etc/jsgantt.diff
@@ -50,10 +50,10 @@ index 81012fb..abc72da 100755
              JSGantt.show(pID, 1, ganttObj);
  
                 if (JSGantt.isIE()) 
--                  {JSGantt.findObj('group_'+pID).innerText = '–';}
+-                  {JSGantt.findObj('group_'+pID).innerText = '?';}
 +                  {JSGantt.findObj('group_'+pID).innerText = '–';}
                 else
--                  {JSGantt.findObj('group_'+pID).textContent = '–';}
+-                  {JSGantt.findObj('group_'+pID).textContent = '?';}
 +                  {JSGantt.findObj('group_'+pID).textContent = '–';}
  
           }
@@ -62,7 +62,7 @@ index 81012fb..abc72da 100755
           } else {
  
              if (JSGantt.isIE()) { // IE;
--               if( JSGantt.findObj('group_'+pID).innerText == '–') {
+-               if( JSGantt.findObj('group_'+pID).innerText == '?') {
 +               if( JSGantt.findObj('group_'+pID).innerText == '–') {
                    JSGantt.findObj('child_'+vID).style.display = "";
                    JSGantt.findObj('childgrid_'+vID).style.display = "";
@@ -71,7 +71,7 @@ index 81012fb..abc72da 100755
  
              } else {
  
--               if( JSGantt.findObj('group_'+pID).textContent == '–') {
+-               if( JSGantt.findObj('group_'+pID).textContent == '?') {
 +               if( JSGantt.findObj('group_'+pID).textContent == '–') {
                    JSGantt.findObj('child_'+vID).style.display = "";
                    JSGantt.findObj('childgrid_'+vID).style.display = "";
@@ -91,95 +91,3 @@ index 81012fb..abc72da 100755
  
    };
  
-diff --git b/jsgantt.diff a/jsgantt.diff
-index 8d09f76..170b69b 100644
---- b/jsgantt.diff
-+++ a/jsgantt.diff
-@@ -0,0 +1,87 @@
-+diff --git b/html/NoAuth/css/jsgantt.css a/html/NoAuth/css/jsgantt.css
-+index 683fcad..5845df1 100755
-+--- b/html/NoAuth/css/jsgantt.css
-++++ a/html/NoAuth/css/jsgantt.css
-+@@ -49,5 +49,5 @@
-+ 
-+ DIV.scroll { BORDER-RIGHT: #efefef 1px solid; PADDING-RIGHT: 0px; BORDER-TOP: #efefef 1px solid; PADDING-LEFT: 0px; PADDING-BOTTOM: 0px; OVERFLOW: hidden; BORDER-LEFT: #efefef 1px solid; WIDTH: 420px; PADDING-TOP: 0px; BORDER-BOTTOM: #efefef 1px solid; BACKGROUND-COLOR: #ffffff }
-+ 
-+-DIV.scroll2 { position:relative; PADDING-RIGHT: 0px; overflow:auto ;overflow-x:scroll;overflow-y:hidden; PADDING-LEFT: 0px; PADDING-BOTTOM: 0px; WIDTH: 482px; PADDING-TOP: 0px; BACKGROUND-COLOR: #ffffff }
-++DIV.scroll2 { position:relative; PADDING-RIGHT: 0px; overflow:auto ;overflow-x:scroll;overflow-y:hidden; PADDING-LEFT: 0px; PADDING-BOTTOM: 0px; WIDTH: 720px; PADDING-TOP: 0px; BACKGROUND-COLOR: #ffffff }
-+ 
-+diff --git b/html/NoAuth/js/jsgantt.js a/html/NoAuth/js/jsgantt.js
-+index 81012fb..9b1654a 100755
-+--- b/html/NoAuth/js/jsgantt.js
-++++ a/html/NoAuth/js/jsgantt.js
-+@@ -1046,7 +1046,7 @@ Complete-Displays task percent complete</p>
-+                }
-+ 
-+                vLeftTable += 
-+-                  '<span onclick=JSGantt.taskLink("' + vTaskList[i].getLink() + '",300,200); style="cursor:pointer"> ' + vTaskList[i].getName() + '</span></NOBR></TD>' ;
-++                  '<span><a target="_blank" href="' + vTaskList[i].getLink() + '">' + vTaskList[i].getName() + '</a></NOBR></TD>' ;
-+ 
-+                if(vShowRes ==1) vLeftTable += '  <TD class=gname style="WIDTH: 60px; HEIGHT: 20px; TEXT-ALIGN: center; BORDER-TOP: #efefef 1px solid; FONT-SIZE: 12px; BORDER-LEFT: #efefef 1px solid;" align=center><NOBR>' + vTaskList[i].getResource() + '</NOBR></TD>' ;
-+                if(vShowDur ==1) vLeftTable += '  <TD class=gname style="WIDTH: 60px; HEIGHT: 20px; TEXT-ALIGN: center; BORDER-TOP: #efefef 1px solid; FONT-SIZE: 12px; BORDER-LEFT: #efefef 1px solid;" align=center><NOBR>' + vTaskList[i].getDuration(vFormat) + '</NOBR></TD>' ;
-+@@ -1113,7 +1113,7 @@ Complete-Displays task percent complete</p>
-+          while(Date.parse(vTmpDate) <= Date.parse(vMaxDate))
-+          {	
-+             vStr = vTmpDate.getFullYear() + '';
-+-            vStr = vStr.substring(2,4);
-++            // vStr = vStr.substring(2,4);
-+             
-+             
-+             if(vFormat == 'minute')
-+@@ -1140,12 +1140,12 @@ Complete-Displays task percent complete</p>
-+             }
-+             else if(vFormat == 'week')
-+             {
-+-  		         vRightTable += '<td class=gdatehead align=center style="FONT-SIZE: 12px; HEIGHT: 19px;" width='+vColWidth+'px>`'+ vStr + '</td>';
-++  		         vRightTable += '<td class=gdatehead align=center style="FONT-SIZE: 12px; HEIGHT: 19px;" width='+vColWidth+'px>'+ vStr + '</td>';
-+                vTmpDate.setDate(vTmpDate.getDate()+7);
-+             }
-+             else if(vFormat == 'month')
-+             {
-+-	            vRightTable += '<td class=gdatehead align=center style="FONT-SIZE: 12px; HEIGHT: 19px;" width='+vColWidth+'px>`'+ vStr + '</td>';
-++	            vRightTable += '<td class=gdatehead align=center style="FONT-SIZE: 12px; HEIGHT: 19px;" width='+vColWidth+'px>'+ vStr + '</td>';
-+                vTmpDate.setDate(vTmpDate.getDate() + 1);
-+                while(vTmpDate.getDate() > 1)
-+                {
-+@@ -1154,7 +1154,7 @@ Complete-Displays task percent complete</p>
-+             }
-+             else if(vFormat == 'quarter')
-+             {
-+-	            vRightTable += '<td class=gdatehead align=center style="FONT-SIZE: 12px; HEIGHT: 19px;" width='+vColWidth+'px>`'+ vStr + '</td>';
-++	            vRightTable += '<td class=gdatehead align=center style="FONT-SIZE: 12px; HEIGHT: 19px;" width='+vColWidth+'px>'+ vStr + '</td>';
-+                vTmpDate.setDate(vTmpDate.getDate() + 81);
-+                while(vTmpDate.getDate() > 1)
-+                {
-+@@ -1905,9 +1905,9 @@ JSGantt.folder= function (pID,ganttObj) {
-+             JSGantt.show(pID, 1, ganttObj);
-+ 
-+                if (JSGantt.isIE()) 
-+-                  {JSGantt.findObj('group_'+pID).innerText = '–';}
-++                  {JSGantt.findObj('group_'+pID).innerText = '–';}
-+                else
-+-                  {JSGantt.findObj('group_'+pID).textContent = '–';}
-++                  {JSGantt.findObj('group_'+pID).textContent = '–';}
-+ 
-+          }
-+ 
-+@@ -1979,7 +1979,7 @@ JSGantt.show =  function (pID, pTop, ganttObj) {
-+          } else {
-+ 
-+             if (JSGantt.isIE()) { // IE;
-+-               if( JSGantt.findObj('group_'+pID).innerText == '–') {
-++               if( JSGantt.findObj('group_'+pID).innerText == '–') {
-+                   JSGantt.findObj('child_'+vID).style.display = "";
-+                   JSGantt.findObj('childgrid_'+vID).style.display = "";
-+                   vList[i].setVisible(1);
-+@@ -1987,7 +1987,7 @@ JSGantt.show =  function (pID, pTop, ganttObj) {
-+ 
-+             } else {
-+ 
-+-               if( JSGantt.findObj('group_'+pID).textContent == '–') {
-++               if( JSGantt.findObj('group_'+pID).textContent == '–') {
-+                   JSGantt.findObj('child_'+vID).style.display = "";
-+                   JSGantt.findObj('childgrid_'+vID).style.display = "";
-+                   vList[i].setVisible(1);

commit b06b892aa45be0fe95f9cc67792a3447edd7deec
Author: sunnavy <sunnavy at bestpractical.com>
Date:   Thu Mar 31 15:08:40 2011 +0800

    update MANIFEST

diff --git a/MANIFEST b/MANIFEST
index feabe1d..8c4009d 100644
--- a/MANIFEST
+++ b/MANIFEST
@@ -1,7 +1,10 @@
 Changes
 etc/jsgantt-showsummary.diff
+etc/jsgantt.diff
 html/Callbacks/JSGantt/Elements/Header/Head
+html/Callbacks/JSGantt/Elements/Tabs/Privileged
 html/Callbacks/JSGantt/Search/Elements/ResultViews/AfterTools
+html/Callbacks/JSGantt/Ticket/Elements/ShowSummary/LinksExtra
 html/NoAuth/css/jsgantt.css
 html/NoAuth/js/jsgantt.js
 html/Search/JSGantt.html

commit fa2085ef4964a01af7bd6a5c2f24865529f834ec
Author: sunnavy <sunnavy at bestpractical.com>
Date:   Thu Mar 31 15:00:43 2011 +0800

    release 0.10

diff --git a/Changes b/Changes
index 6f2f6ef..9e56e54 100644
--- a/Changes
+++ b/Changes
@@ -1,5 +1,10 @@
 Revision history for RT-Extension-JSGantt
 
+0.10 Thu Mar 31 14:59:47 CST 2011
+
+    * use a generic JSGanttOptions config, see README for example
+    * make it work with RT 4
+
 0.04 Thu Sep 23 09:20:16 CST 2010
 
     * in case there are remote links

commit 5a90c5e4d6070c987fa12f9c19fa20c9a5fefeee
Author: sunnavy <sunnavy at bestpractical.com>
Date:   Thu Mar 31 15:19:56 2011 +0800

    bump to 0.11

diff --git a/META.yml b/META.yml
index f1da7d6..6723050 100644
--- a/META.yml
+++ b/META.yml
@@ -20,4 +20,4 @@ no_index:
     - inc
 requires:
   JSON: 0
-version: 0.10
+version: 0.11
diff --git a/lib/RT/Extension/JSGantt.pm b/lib/RT/Extension/JSGantt.pm
index d5fb2b4..697adfe 100644
--- a/lib/RT/Extension/JSGantt.pm
+++ b/lib/RT/Extension/JSGantt.pm
@@ -2,7 +2,7 @@
 #
 # COPYRIGHT:
 #
-# This software is Copyright (c) 1996-2010 Best Practical Solutions, LLC
+# This software is Copyright (c) 1996-2011 Best Practical Solutions, LLC
 #                                          <jesse at bestpractical.com>
 #
 # (Except where explicitly superseded by other copyright notices)
@@ -58,7 +58,7 @@ RT::Extension::JSGantt - Gantt charts for your tickets
 
 package RT::Extension::JSGantt;
 
-our $VERSION = '0.10';
+our $VERSION = '0.11';
 
 use warnings;
 use strict;

commit 6ce4703e296d2344912422fda07492ed92139fc1
Author: sunnavy <sunnavy at bestpractical.com>
Date:   Thu Mar 31 15:20:02 2011 +0800

    update copyright

diff --git a/html/Callbacks/JSGantt/Elements/Header/Head b/html/Callbacks/JSGantt/Elements/Header/Head
index 201ad0e..77a589c 100644
--- a/html/Callbacks/JSGantt/Elements/Header/Head
+++ b/html/Callbacks/JSGantt/Elements/Header/Head
@@ -2,7 +2,7 @@
 %# 
 %# COPYRIGHT:
 %# 
-%# This software is Copyright (c) 1996-2009 Best Practical Solutions, LLC
+%# This software is Copyright (c) 1996-2011 Best Practical Solutions, LLC
 %#                                          <jesse at bestpractical.com>
 %# 
 %# (Except where explicitly superseded by other copyright notices)
diff --git a/html/Callbacks/JSGantt/Elements/Tabs/Privileged b/html/Callbacks/JSGantt/Elements/Tabs/Privileged
index d948ffa..408cd2e 100644
--- a/html/Callbacks/JSGantt/Elements/Tabs/Privileged
+++ b/html/Callbacks/JSGantt/Elements/Tabs/Privileged
@@ -2,7 +2,7 @@
 %# 
 %# COPYRIGHT:
 %# 
-%# This software is Copyright (c) 1996-2009 Best Practical Solutions, LLC
+%# This software is Copyright (c) 1996-2011 Best Practical Solutions, LLC
 %#                                          <jesse at bestpractical.com>
 %# 
 %# (Except where explicitly superseded by other copyright notices)
diff --git a/html/Callbacks/JSGantt/Search/Elements/ResultViews/AfterTools b/html/Callbacks/JSGantt/Search/Elements/ResultViews/AfterTools
index a0b8d6f..c8ad143 100644
--- a/html/Callbacks/JSGantt/Search/Elements/ResultViews/AfterTools
+++ b/html/Callbacks/JSGantt/Search/Elements/ResultViews/AfterTools
@@ -2,7 +2,7 @@
 %# 
 %# COPYRIGHT:
 %# 
-%# This software is Copyright (c) 1996-2009 Best Practical Solutions, LLC
+%# This software is Copyright (c) 1996-2011 Best Practical Solutions, LLC
 %#                                          <jesse at bestpractical.com>
 %# 
 %# (Except where explicitly superseded by other copyright notices)
diff --git a/html/Callbacks/JSGantt/Ticket/Elements/ShowSummary/LinksExtra b/html/Callbacks/JSGantt/Ticket/Elements/ShowSummary/LinksExtra
index 06e3e53..7300ada 100644
--- a/html/Callbacks/JSGantt/Ticket/Elements/ShowSummary/LinksExtra
+++ b/html/Callbacks/JSGantt/Ticket/Elements/ShowSummary/LinksExtra
@@ -2,7 +2,7 @@
 %# 
 %# COPYRIGHT:
 %# 
-%# This software is Copyright (c) 1996-2009 Best Practical Solutions, LLC
+%# This software is Copyright (c) 1996-2011 Best Practical Solutions, LLC
 %#                                          <jesse at bestpractical.com>
 %# 
 %# (Except where explicitly superseded by other copyright notices)

-----------------------------------------------------------------------



More information about the Bps-public-commit mailing list