[Rt-commit] r13490 - in rt/3.8/branches/rt-3.8.0-releng: lib/RT/Graph share/html/Elements share/html/NoAuth/css/web2 share/html/Prefs share/html/Ticket/Graphs share/html/Ticket/Graphs/Elements

jesse at bestpractical.com jesse at bestpractical.com
Fri Jun 20 18:36:28 EDT 2008


Author: jesse
Date: Fri Jun 20 18:36:27 2008
New Revision: 13490

Modified:
   rt/3.8/branches/rt-3.8.0-releng/   (props changed)
   rt/3.8/branches/rt-3.8.0-releng/Makefile.in
   rt/3.8/branches/rt-3.8.0-releng/lib/RT/Graph/Tickets.pm
   rt/3.8/branches/rt-3.8.0-releng/share/html/Elements/ShowSearch
   rt/3.8/branches/rt-3.8.0-releng/share/html/NoAuth/css/web2/forms.css
   rt/3.8/branches/rt-3.8.0-releng/share/html/Prefs/Search.html
   rt/3.8/branches/rt-3.8.0-releng/share/html/Ticket/Graphs/Elements/EditGraphProperties
   rt/3.8/branches/rt-3.8.0-releng/share/html/Ticket/Graphs/index.html

Log:
 r33042 at 68-246-70-236:  jesse | 2008-06-17 13:18:54 -0400
  r33036 at 31b (orig r13353):  jesse | 2008-06-17 13:17:34 -0400
   r32965 at 31b (orig r13319):  sunnavy | 2008-06-15 16:20:56 -0400
   take files below etc/ more carefull
  
  r33037 at 31b (orig r13354):  jesse | 2008-06-17 13:17:51 -0400
   r32993 at 31b (orig r13341):  kyoki | 2008-06-16 17:55:07 -0400
    r23051 at nyx:  kyoki | 2008-06-16 17:55:07 -0400
    RT-Ticket: 9671
    RT-Status: Resolved
    RT-Update: Correspond
    added focus and hover effects to buttons
   
  
  r33038 at 31b (orig r13355):  jesse | 2008-06-17 13:17:56 -0400
   r32996 at 31b (orig r13344):  ruz | 2008-06-16 19:15:17 -0400
   * add error handling when there is no property callback defined
     for graphs and FillUsing argument
  
  r33039 at 31b (orig r13356):  jesse | 2008-06-17 13:18:02 -0400
   r32997 at 31b (orig r13345):  ruz | 2008-06-16 20:40:37 -0400
   * all arguments to work with saved searches have prefix SavedSearch,
     not sufix
  
  r33040 at 31b (orig r13357):  jesse | 2008-06-17 13:18:07 -0400
   r32998 at 31b (orig r13346):  ruz | 2008-06-16 21:48:21 -0400
   * use 'our' instead of 'my' in lib/RT/Graph/Tickets.pm
   ** try to workaround mysterious bug
  
  r33041 at 31b (orig r13358):  jesse | 2008-06-17 13:18:11 -0400
   r32999 at 31b (orig r13347):  ruz | 2008-06-16 22:08:04 -0400
   * add support for graphs direction
  
 


Modified: rt/3.8/branches/rt-3.8.0-releng/Makefile.in
==============================================================================
--- rt/3.8/branches/rt-3.8.0-releng/Makefile.in	(original)
+++ rt/3.8/branches/rt-3.8.0-releng/Makefile.in	Fri Jun 20 18:36:27 2008
@@ -160,6 +160,22 @@
 				$(DESTDIR)/$(RT_SBIN_PATH)/rt-shredder \
 				$(DESTDIR)/$(RT_SBIN_PATH)/rt-notify-group-admin
 
+ETC_FILES		=	$(DESTDIR)/$(RT_ETC_PATH)/RT_Config.pm \
+			$(DESTDIR)/$(RT_ETC_PATH)/RT_SiteConfig.pm \
+			$(DESTDIR)/$(RT_ETC_PATH)/acl.Informix \
+			$(DESTDIR)/$(RT_ETC_PATH)/acl.Pg \
+			$(DESTDIR)/$(RT_ETC_PATH)/acl.Oracle \
+			$(DESTDIR)/$(RT_ETC_PATH)/acl.mysql \
+			$(DESTDIR)/$(RT_ETC_PATH)/acl.Sybase \
+			$(DESTDIR)/$(RT_ETC_PATH)/schema.Informix \
+			$(DESTDIR)/$(RT_ETC_PATH)/schema.Pg \
+			$(DESTDIR)/$(RT_ETC_PATH)/schema.Oracle \
+			$(DESTDIR)/$(RT_ETC_PATH)/schema.mysql \
+			$(DESTDIR)/$(RT_ETC_PATH)/schema.mysql-4.1 \
+			$(DESTDIR)/$(RT_ETC_PATH)/schema.Sybase \
+			$(DESTDIR)/$(RT_ETC_PATH)/schema.SQLite \
+			$(DESTDIR)/$(RT_ETC_PATH)/initialdata
+
 # }}}
 
 # {{{ Web frontend
@@ -290,7 +306,7 @@
 	chmod $(RT_READABLE_DIR_MODE) $(DESTDIR)/$(RT_BIN_PATH)	
 
 	chmod 0755 $(DESTDIR)/$(RT_ETC_PATH)
-	chmod 0400 $(DESTDIR)/$(RT_ETC_PATH)/*
+	chmod 0400 $(ETC_FILES)
 
 	#TODO: the config file should probably be able to have its
 	# owner set separately from the binaries.
@@ -416,11 +432,7 @@
 
 etc-install:
 	$(INSTALL) -m 0755 -d $(DESTDIR)/$(RT_ETC_PATH)
-	-$(INSTALL) -m 0644 \
-		etc/acl.* \
-		etc/initialdata \
-		etc/schema.* \
-		$(DESTDIR)/$(RT_ETC_PATH)/
+	-$(INSTALL) -m 0644 $(ETC_FILES) $(DESTDIR)/$(RT_ETC_PATH)/
 # }}}
 
 # {{{ sbin-install

Modified: rt/3.8/branches/rt-3.8.0-releng/lib/RT/Graph/Tickets.pm
==============================================================================
--- rt/3.8/branches/rt-3.8.0-releng/lib/RT/Graph/Tickets.pm	(original)
+++ rt/3.8/branches/rt-3.8.0-releng/lib/RT/Graph/Tickets.pm	Fri Jun 20 18:36:27 2008
@@ -75,14 +75,14 @@
     deleted  => { fontcolor => '#A9A9A9' },
 );
 
-my %link_style = (
+our %link_style = (
     MemberOf  => { style => 'solid' },
     DependsOn => { style => 'dashed' },
     RefersTo  => { style => 'dotted' },
 );
 
 # We don't use qw() because perl complains about "possible attempt to put comments in qw() list"
-my @fill_colors = split ' ',<<EOT;
+our @fill_colors = split ' ',<<EOT;
     #0000FF #8A2BE2 #A52A2A #DEB887 #5F9EA0 #7FFF00 #D2691E #FF7F50
     #6495ED #FFF8DC #DC143C #00FFFF #00008B #008B8B #B8860B #A9A9A9
     #A9A9A9 #006400 #BDB76B #8B008B #556B2F #FF8C00 #9932CC #8B0000
@@ -110,7 +110,7 @@
 
 our (%fill_cache, @available_colors) = ();
 
-my %property_cb = (
+our %property_cb = (
     Queue => sub { return $_[0]->QueueObj->Name || $_[0]->Queue },
     CF    => sub {
         my $values = $_[0]->CustomFieldValues( $_[1] );
@@ -239,7 +239,12 @@
     
     if ( $args{'FillUsing'} ) {
         my ($key, @subkeys) = $self->_SplitProperty( $args{'FillUsing'} );
-        my $value = $property_cb{ $key }->( $args{'Ticket'}, @subkeys );
+        my $value;
+        if ( $property_cb{ $key } ) {
+            $value = $property_cb{ $key }->( $args{'Ticket'}, @subkeys );
+        } else {
+            $RT::Logger->error("Couldn't find property callback for '$key'");
+        }
         if ( defined $value && length $value && $value =~ /\S/ ) {
             my $fill = $fill_cache{ $value };
             $fill = $fill_cache{ $value } = shift @available_colors
@@ -262,6 +267,7 @@
         Ticket               => undef,
 
         Graph                => undef,
+        Direction            => 'TB',
         Seen                 => undef,
         SeenEdge             => undef,
 
@@ -278,6 +284,8 @@
         $args{'Graph'} = GraphViz->new(
             name    => 'ticket_links_'. $args{'Ticket'}->id,
             bgcolor => "transparent",
+# TODO: patch GraphViz to support all posible RDs
+            rankdir => ($args{'Direction'} || "TB") eq "LR",
             node => { shape => 'box', style => 'filled,rounded', fillcolor => 'white' },
         );
         %fill_cache = ();

Modified: rt/3.8/branches/rt-3.8.0-releng/share/html/Elements/ShowSearch
==============================================================================
--- rt/3.8/branches/rt-3.8.0-releng/share/html/Elements/ShowSearch	(original)
+++ rt/3.8/branches/rt-3.8.0-releng/share/html/Elements/ShowSearch	Fri Jun 20 18:36:27 2008
@@ -77,7 +77,7 @@
     } else {
         $customize = RT->Config->Get('WebPath') . '/Search/Build.html?'
             . $m->comp( '/Elements/QueryString',
-            LoadSavedSearch => $SavedSearch );
+            SavedSearchLoad => $SavedSearch );
     }
 } else {
     ($search) = RT::System->new( $session{'CurrentUser'} ) ->Attributes->Named( 'Search - ' . $Name );

Modified: rt/3.8/branches/rt-3.8.0-releng/share/html/NoAuth/css/web2/forms.css
==============================================================================
--- rt/3.8/branches/rt-3.8.0-releng/share/html/NoAuth/css/web2/forms.css	(original)
+++ rt/3.8/branches/rt-3.8.0-releng/share/html/NoAuth/css/web2/forms.css	Fri Jun 20 18:36:27 2008
@@ -89,7 +89,13 @@
    -webkit-border-radius: 0.5em;
 }
 
+input.button:hover{
+   background: #006;
+}
 
+input.button:focus{
+   background: #006;
+}
 
 div.error div.error {
  border: 2px solid #aa0000;

Modified: rt/3.8/branches/rt-3.8.0-releng/share/html/Prefs/Search.html
==============================================================================
--- rt/3.8/branches/rt-3.8.0-releng/share/html/Prefs/Search.html	(original)
+++ rt/3.8/branches/rt-3.8.0-releng/share/html/Prefs/Search.html	Fri Jun 20 18:36:27 2008
@@ -58,7 +58,7 @@
   <&|/l&>You can also edit the predefined search itself</&>:
   <a href="<% RT->Config->Get('WebPath').'/Search/Build.html?'.
 	  $m->comp('/Elements/QueryString',
-		   LoadSavedSearch => 'RT::System-1-SavedSearch-'.$id) %>"><% $search->Name %></a>
+		   SavedSearchLoad => 'RT::System-1-SavedSearch-'.$id) %>"><% $search->Name %></a>
 </p>
 % }
 

Modified: rt/3.8/branches/rt-3.8.0-releng/share/html/Ticket/Graphs/Elements/EditGraphProperties
==============================================================================
--- rt/3.8/branches/rt-3.8.0-releng/share/html/Ticket/Graphs/Elements/EditGraphProperties	(original)
+++ rt/3.8/branches/rt-3.8.0-releng/share/html/Ticket/Graphs/Elements/EditGraphProperties	Fri Jun 20 18:36:27 2008
@@ -47,6 +47,14 @@
 %# END BPS TAGGED BLOCK }}}
 <&| /Widgets/TitleBox, title => loc('Graph Properties') &>
 
+<% loc('Direction') %> <select name="Direction">
+<option value="TB" <% ($Direction||'TB') eq 'TB'? 'selected="selected"': '' |n %>><% loc('top to bottom') %></option>
+<option value="LR" <% ($Direction||'TB') eq 'LR'? 'selected="selected"': '' |n %>><% loc('left to right') %></option>
+%# XXX: not supported by GraphViz perl module
+%#<option value="BT" <% ($Direction||'TB') eq 'BT'? 'selected="selected"': '' |n %>><% loc('bottom to top') %></option>
+%#<option value="RL" <% ($Direction||'TB') eq 'RL'? 'selected="selected"': '' |n %>><% loc('right to left') %></option>
+</select><br />
+
 <% loc('Main type of links') %> <select name="LeadingLink">
 % foreach ( @link_types ) {
 <option value="<% $_ %>" <% ($LeadingLink||'Members') eq $_? 'selected="selected"': '' |n %>><% loc($_) %></option>
@@ -116,6 +124,7 @@
 
 <%ARGS>
 $id => undef
+$Direction => 'TB'
 $LeadingLink => 'Members'
 @ShowLinks => ('MemberOf', 'DependsOn', 'RefersTo')
 $MaxDepth => 3

Modified: rt/3.8/branches/rt-3.8.0-releng/share/html/Ticket/Graphs/index.html
==============================================================================
--- rt/3.8/branches/rt-3.8.0-releng/share/html/Ticket/Graphs/index.html	(original)
+++ rt/3.8/branches/rt-3.8.0-releng/share/html/Ticket/Graphs/index.html	Fri Jun 20 18:36:27 2008
@@ -78,7 +78,7 @@
 use RT::Graph::Tickets;
 my @results;
 
-my @save_arguments = qw(id LeadingLink ShowLinks MaxDepth FillUsing ShowLinkDescriptions);
+my @save_arguments = qw(id Direction LeadingLink ShowLinks MaxDepth FillUsing ShowLinkDescriptions);
 foreach my $level ( 0 .. 6 ) {
     push @save_arguments, "Level-". $level ."-Properties";
 }


More information about the Rt-commit mailing list