[Bps-public-commit] rt-extension-jsgantt branch, master, updated. 3462406afab5206a349419d887143bc41a24e356
? sunnavy
sunnavy at bestpractical.com
Mon Feb 10 06:43:08 EST 2014
The branch, master has been updated
via 3462406afab5206a349419d887143bc41a24e356 (commit)
via 640b543b79fd271d54a4d61a3f2ee97abe360abf (commit)
via 3d387d337f1673f14ec020a18e495267272e37aa (commit)
via 01ab458258d5952eee0fabfd6082e2d289c41bfd (commit)
via d07cd3019b2b21c3ca8c549207bbd8a1cf0871b5 (commit)
via fb54f3f9ec677fee165acfa2f519d03f585390f5 (commit)
from e9047cd5d9f365a837a33924528b8cc1ef2b8e99 (commit)
Summary of changes:
Changes | 7 +++-
MANIFEST | 1 -
META.yml | 2 +-
README | 7 ++--
etc/jsgantt-showsummary.diff | 12 ------
html/Callbacks/JSGantt/Elements/Header/Head | 2 +-
html/Callbacks/JSGantt/Elements/Tabs/Privileged | 18 +++++---
.../JSGantt/Search/Elements/ResultViews/AfterTools | 2 +-
.../JSGantt/Ticket/Elements/ShowSummary/LinksExtra | 2 +-
html/Search/JSGantt.html | 6 ---
inc/Module/Install/RTx.pm | 48 ++++++++--------------
lib/RT/Extension/JSGantt.pm | 4 +-
12 files changed, 45 insertions(+), 66 deletions(-)
delete mode 100644 etc/jsgantt-showsummary.diff
- Log -----------------------------------------------------------------
commit fb54f3f9ec677fee165acfa2f519d03f585390f5
Author: sunnavy <sunnavy at bestpractical.com>
Date: Thu Feb 6 19:28:41 2014 +0800
update inc/
diff --git a/inc/Module/Install/RTx.pm b/inc/Module/Install/RTx.pm
index 73b9cda..ac04c79 100644
--- a/inc/Module/Install/RTx.pm
+++ b/inc/Module/Install/RTx.pm
@@ -8,13 +8,13 @@ no warnings 'once';
use Module::Install::Base;
use base 'Module::Install::Base';
-our $VERSION = '0.29';
+our $VERSION = '0.32';
use FindBin;
use File::Glob ();
use File::Basename ();
-my @DIRS = qw(etc lib html bin sbin po var);
+my @DIRS = qw(etc lib html static bin sbin po var);
my @INDEX_DIRS = qw(lib bin sbin);
sub RTx {
@@ -62,10 +62,11 @@ sub RTx {
unshift @INC, "$RT::LocalPath/lib" if $RT::LocalPath;
unshift @INC, $lib_path;
- $RT::LocalVarPath ||= $RT::VarPath;
- $RT::LocalPoPath ||= $RT::LocalLexiconPath;
- $RT::LocalHtmlPath ||= $RT::MasonComponentRoot;
- $RT::LocalLibPath ||= "$RT::LocalPath/lib";
+ $RT::LocalVarPath ||= $RT::VarPath;
+ $RT::LocalPoPath ||= $RT::LocalLexiconPath;
+ $RT::LocalHtmlPath ||= $RT::MasonComponentRoot;
+ $RT::LocalStaticPath ||= $RT::StaticPath;
+ $RT::LocalLibPath ||= "$RT::LocalPath/lib";
my $with_subdirs = $ENV{WITH_SUBDIRS};
@ARGV = grep { /WITH_SUBDIRS=(.*)/ ? ( ( $with_subdirs = $1 ), 0 ) : 1 }
@@ -129,23 +130,13 @@ install ::
my %has_etc;
if ( File::Glob::bsd_glob("$FindBin::Bin/etc/schema.*") ) {
-
- # got schema, load factory module
$has_etc{schema}++;
- $self->load('RTxFactory');
- $self->postamble(<< ".");
-factory ::
-\t\$(NOECHO) \$(PERL) -Ilib -I"$local_lib_path" -I"$lib_path" -Minc::Module::Install -e"RTxFactory(qw($RTx $name))"
-
-dropdb ::
-\t\$(NOECHO) \$(PERL) -Ilib -I"$local_lib_path" -I"$lib_path" -Minc::Module::Install -e"RTxFactory(qw($RTx $name drop))"
-
-.
}
if ( File::Glob::bsd_glob("$FindBin::Bin/etc/acl.*") ) {
$has_etc{acl}++;
}
if ( -e 'etc/initialdata' ) { $has_etc{initialdata}++; }
+ if ( -d 'etc/upgrade/' ) { $has_etc{upgrade}++; }
$self->postamble("$postamble\n");
unless ( $subdirs{'lib'} ) {
@@ -164,28 +155,25 @@ dropdb ::
print "For first-time installation, type 'make initdb'.\n";
my $initdb = '';
$initdb .= <<"." if $has_etc{schema};
-\t\$(NOECHO) \$(PERL) -Ilib -I"$local_lib_path" -I"$lib_path" -Minc::Module::Install -e"RTxInitDB(qw(schema))"
+\t\$(NOECHO) \$(PERL) -Ilib -I"$local_lib_path" -I"$lib_path" -Minc::Module::Install -e"RTxInitDB(qw(schema \$(NAME) \$(VERSION)))"
.
$initdb .= <<"." if $has_etc{acl};
-\t\$(NOECHO) \$(PERL) -Ilib -I"$local_lib_path" -I"$lib_path" -Minc::Module::Install -e"RTxInitDB(qw(acl))"
+\t\$(NOECHO) \$(PERL) -Ilib -I"$local_lib_path" -I"$lib_path" -Minc::Module::Install -e"RTxInitDB(qw(acl \$(NAME) \$(VERSION)))"
.
$initdb .= <<"." if $has_etc{initialdata};
-\t\$(NOECHO) \$(PERL) -Ilib -I"$local_lib_path" -I"$lib_path" -Minc::Module::Install -e"RTxInitDB(qw(insert))"
+\t\$(NOECHO) \$(PERL) -Ilib -I"$local_lib_path" -I"$lib_path" -Minc::Module::Install -e"RTxInitDB(qw(insert \$(NAME) \$(VERSION)))"
.
$self->postamble("initdb ::\n$initdb\n");
$self->postamble("initialize-database ::\n$initdb\n");
+ if ($has_etc{upgrade}) {
+ print "To upgrade from a previous version of this extension, use 'make upgrade-database'\n";
+ my $upgradedb = qq|\t\$(NOECHO) \$(PERL) -Ilib -I"$local_lib_path" -I"$lib_path" -Minc::Module::Install -e"RTxInitDB(qw(upgrade \$(NAME) \$(VERSION)))"\n|;
+ $self->postamble("upgrade-database ::\n$upgradedb\n");
+ $self->postamble("upgradedb ::\n$upgradedb\n");
+ }
}
}
-sub RTxInit {
- unshift @INC, substr( delete( $INC{'RT.pm'} ), 0, -5 ) if $INC{'RT.pm'};
- require RT;
- RT::LoadConfig();
- RT::ConnectToDatabase();
-
- die "Cannot load RT" unless $RT::Handle and $RT::DatabaseType;
-}
-
# stolen from RT::Handle so we work on 3.6 (cmp_versions came in with 3.8)
{ my %word = (
a => -4,
@@ -228,4 +216,4 @@ sub requires_rt {
__END__
-#line 348
+#line 336
commit d07cd3019b2b21c3ca8c549207bbd8a1cf0871b5
Author: sunnavy <sunnavy at bestpractical.com>
Date: Fri Feb 7 20:04:47 2014 +0800
drop RT 3 support
in the future, we migrate js/css files to RT 4's structure.
diff --git a/MANIFEST b/MANIFEST
index 8c4009d..af04f47 100644
--- a/MANIFEST
+++ b/MANIFEST
@@ -1,5 +1,4 @@
Changes
-etc/jsgantt-showsummary.diff
etc/jsgantt.diff
html/Callbacks/JSGantt/Elements/Header/Head
html/Callbacks/JSGantt/Elements/Tabs/Privileged
diff --git a/README b/README
index d939c2f..ee0b83e 100644
--- a/README
+++ b/README
@@ -37,11 +37,8 @@ How to install:
DefaultDays => 7,
);
-5. patch /Ticket/Elements/ShowSummary if you are using rt < 3.9
- $ patch /path/to/Ticket/Elements/ShowSummary < /path/to/rt/local/plugins/RT-Extension-JSGantt/etc/jsgantt-showsummary.diff
6. restart RT
-
How to update jsgantt.js and jsgantt.css:
To make it work better with RT, we changed original jsgantt.js and jsgantt.css,
diff --git a/etc/jsgantt-showsummary.diff b/etc/jsgantt-showsummary.diff
deleted file mode 100644
index 98f22e3..0000000
--- a/etc/jsgantt-showsummary.diff
+++ /dev/null
@@ -1,12 +0,0 @@
-diff --git a/share/html/Ticket/Elements/ShowSummary b/share/html/Ticket/Elements/ShowSummary
-index 21c53c5..264dcdc 100755
---- a/share/html/Ticket/Elements/ShowSummary
-+++ b/share/html/Ticket/Elements/ShowSummary
-@@ -107,6 +107,7 @@
-
- % my (@extra);
- % push @extra, titleright_raw => '<a href="'. RT->Config->Get('WebPath'). '/Ticket/Graphs/index.html?id='.$Ticket->id.'">'.loc('Graph').'</a>' unless RT->Config->Get('DisableGraphViz');
-+% $m->callback( %ARGS, CallbackName => 'LinksExtra', extra => \@extra );
- <&| /Widgets/TitleBox, title => loc('Links'),
- title_href => RT->Config->Get('WebPath')."/Ticket/ModifyLinks.html?id=".$Ticket->Id,
- class => 'ticket-info-links',
diff --git a/html/Search/JSGantt.html b/html/Search/JSGantt.html
index 9ff602a..473d8c6 100644
--- a/html/Search/JSGantt.html
+++ b/html/Search/JSGantt.html
@@ -2,13 +2,7 @@
Refresh => $session{'tickets_refresh_interval'} || RT->Config->Get('SearchResultsRefreshInterval', $session{'CurrentUser'} ),
&>
-% if ( $m->comp_exists( '/Ticket/Elements/Tabs' ) ) {
-<& /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 01ab458258d5952eee0fabfd6082e2d289c41bfd
Author: sunnavy <sunnavy at bestpractical.com>
Date: Fri Feb 7 19:50:03 2014 +0800
show Gantt link on more /Search/ pages when possible
diff --git a/html/Callbacks/JSGantt/Elements/Tabs/Privileged b/html/Callbacks/JSGantt/Elements/Tabs/Privileged
index 9ad1c3d..5b251e6 100644
--- a/html/Callbacks/JSGantt/Elements/Tabs/Privileged
+++ b/html/Callbacks/JSGantt/Elements/Tabs/Privileged
@@ -48,11 +48,17 @@
<%INIT>
my $request_path = $HTML::Mason::Commands::r->path_info;
-if ( $request_path =~ qr{^/Search/Results.html} ) {
- my $tabs = PageMenu;
- require Encode;
- $tabs->child( 'gantt' => title => loc('Gantt Chart'),
- path => '/Search/JSGantt.html?Query=' . Encode::decode_utf8 $m->request_args->{'Query'} );
+if ( $request_path =~ qr{^/Search/} ) {
+ if ( $request_path =~ qr{^/Search/JSGantt.html} && $DECODED_ARGS->{Ticket} ) {
+ PageMenu->child( 'gantt' => title => loc('Gantt Chart'), path => '/Search/JSGantt.html?Ticket=' . $DECODED_ARGS->{Ticket} );
+ }
+ else {
+ my $current_search = $session{"CurrentSearchHash"} || {};
+ my $query = $DECODED_ARGS->{'Query'} || $current_search->{'Query'};
+ if ( $query ) {
+ PageMenu->child( 'gantt' => title => loc('Gantt Chart'), path => '/Search/JSGantt.html?Query=' . $query );
+ }
+ }
}
</%INIT>
commit 3d387d337f1673f14ec020a18e495267272e37aa
Author: sunnavy <sunnavy at bestpractical.com>
Date: Mon Feb 10 19:37:40 2014 +0800
update copyright year
diff --git a/html/Callbacks/JSGantt/Elements/Header/Head b/html/Callbacks/JSGantt/Elements/Header/Head
index 77a589c..4a34104 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-2011 Best Practical Solutions, LLC
+%# This software is Copyright (c) 1996-2014 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 5b251e6..6960553 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-2011 Best Practical Solutions, LLC
+%# This software is Copyright (c) 1996-2014 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 c8ad143..ade2dc5 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-2011 Best Practical Solutions, LLC
+%# This software is Copyright (c) 1996-2014 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 7300ada..4d580eb 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-2011 Best Practical Solutions, LLC
+%# This software is Copyright (c) 1996-2014 Best Practical Solutions, LLC
%# <jesse at bestpractical.com>
%#
%# (Except where explicitly superseded by other copyright notices)
diff --git a/lib/RT/Extension/JSGantt.pm b/lib/RT/Extension/JSGantt.pm
index fa65b10..0e6c802 100644
--- a/lib/RT/Extension/JSGantt.pm
+++ b/lib/RT/Extension/JSGantt.pm
@@ -2,7 +2,7 @@
#
# COPYRIGHT:
#
-# This software is Copyright (c) 1996-2011 Best Practical Solutions, LLC
+# This software is Copyright (c) 1996-2014 Best Practical Solutions, LLC
# <jesse at bestpractical.com>
#
# (Except where explicitly superseded by other copyright notices)
commit 640b543b79fd271d54a4d61a3f2ee97abe360abf
Author: sunnavy <sunnavy at bestpractical.com>
Date: Mon Feb 10 19:30:55 2014 +0800
release 0.20
diff --git a/Changes b/Changes
index 4b0dbbd..5107c1e 100644
--- a/Changes
+++ b/Changes
@@ -1,6 +1,9 @@
Revision history for RT-Extension-JSGantt
-0.20
+0.20 Mon Feb 10 19:25:33 CST 2014
+
+ * show Gantt link on more /Search/ pages
+ * drop RT 3 support
0.19 Sat Oct 20 12:14:51 CST 2012
diff --git a/README b/README
index ee0b83e..95d1f7d 100644
--- a/README
+++ b/README
@@ -1,4 +1,6 @@
-RT-Extension-JSGantt version 0.18
+RT-Extension-JSGantt version 0.20
+
+CAVEAT: please use version 0.18 if you are running RT 3.
How to install:
commit 3462406afab5206a349419d887143bc41a24e356
Author: sunnavy <sunnavy at bestpractical.com>
Date: Mon Feb 10 19:33:53 2014 +0800
bump to 0.21
diff --git a/Changes b/Changes
index 5107c1e..d744445 100644
--- a/Changes
+++ b/Changes
@@ -1,5 +1,7 @@
Revision history for RT-Extension-JSGantt
+0.21
+
0.20 Mon Feb 10 19:25:33 CST 2014
* show Gantt link on more /Search/ pages
diff --git a/META.yml b/META.yml
index 1f1fd2b..dd808e7 100644
--- a/META.yml
+++ b/META.yml
@@ -24,4 +24,4 @@ requires:
List::MoreUtils: 0
resources:
repository: git://github.com/bestpractical/rt-extension-jsgantt.git
-version: 0.20
+version: 0.21
diff --git a/README b/README
index 95d1f7d..c609a7e 100644
--- a/README
+++ b/README
@@ -1,4 +1,4 @@
-RT-Extension-JSGantt version 0.20
+RT-Extension-JSGantt version 0.21
CAVEAT: please use version 0.18 if you are running RT 3.
diff --git a/lib/RT/Extension/JSGantt.pm b/lib/RT/Extension/JSGantt.pm
index 0e6c802..b724342 100644
--- a/lib/RT/Extension/JSGantt.pm
+++ b/lib/RT/Extension/JSGantt.pm
@@ -58,7 +58,7 @@ RT::Extension::JSGantt - Gantt charts for your tickets
package RT::Extension::JSGantt;
-our $VERSION = '0.20';
+our $VERSION = '0.21';
use warnings;
use strict;
-----------------------------------------------------------------------
More information about the Bps-public-commit
mailing list