[Rt-commit] r18444 - in rt/3.999/branches/lorzy: . etc lib lib/RT lib/RT/Graph lib/RT/Model lib/RT/View share/html/Approvals/Elements share/html/Dashboards share/html/Elements share/html/Ticket/Graphs share/html/Ticket/Graphs/Elements share/web/static/css share/web/static/js t/ticket
clkao at bestpractical.com
clkao at bestpractical.com
Wed Feb 18 07:46:12 EST 2009
Author: clkao
Date: Wed Feb 18 07:46:11 2009
New Revision: 18444
Added:
rt/3.999/branches/lorzy/share/html/Ticket/Graphs/Render
Removed:
rt/3.999/branches/lorzy/share/html/Dashboards/dhandler
rt/3.999/branches/lorzy/share/html/Ticket/Graphs/dhandler
Modified:
rt/3.999/branches/lorzy/ (props changed)
rt/3.999/branches/lorzy/etc/initialdata
rt/3.999/branches/lorzy/lib/RT.pm
rt/3.999/branches/lorzy/lib/RT/Dispatcher.pm
rt/3.999/branches/lorzy/lib/RT/Graph/Tickets.pm
rt/3.999/branches/lorzy/lib/RT/Model/TicketCollection.pm
rt/3.999/branches/lorzy/lib/RT/View/Ticket.pm
rt/3.999/branches/lorzy/share/html/Approvals/Elements/PendingMyApproval
rt/3.999/branches/lorzy/share/html/Elements/SelectDate
rt/3.999/branches/lorzy/share/html/Ticket/Create.html
rt/3.999/branches/lorzy/share/html/Ticket/Graphs/Elements/EditGraphProperties
rt/3.999/branches/lorzy/share/html/Ticket/Graphs/index.html
rt/3.999/branches/lorzy/share/web/static/css/forms.css
rt/3.999/branches/lorzy/share/web/static/css/login.css
rt/3.999/branches/lorzy/share/web/static/js/util.js
rt/3.999/branches/lorzy/t/ticket/search_by_watcher.t
Log:
merge down from trunk
Modified: rt/3.999/branches/lorzy/etc/initialdata
==============================================================================
--- rt/3.999/branches/lorzy/etc/initialdata (original)
+++ rt/3.999/branches/lorzy/etc/initialdata Wed Feb 18 07:46:11 2009
@@ -25,7 +25,7 @@
use Scalar::Defer 'lazy';
my $approvals_id = lazy {
- my $queue = RT::Model::Queue->new;
+ my $queue = RT::Model::Queue->new( current_user => RT->system_user );
$queue->load_by_cols(name => "___Approvals");
$queue->id;
};
@@ -357,7 +357,7 @@
Approver\'s notes: { $notes }
'
},
- { queue => '___Approvals',
+ { queue => $approvals_id,
name => "Approval Ready for Owner", # loc
description =>
"Notify Owner of their ticket has been approved and is ready to be acted on", # loc
@@ -520,31 +520,6 @@
scrip_condition => 'On Transaction',
scrip_action => 'Extract Subject Tag',
template => 'Blank' },
-{
- queue => 0,
- name => "Error: Missing dashboard", # loc
- description =>
- "Inform user that a dashboard he subscribed to is missing", # loc
- content => q{Subject: [{RT->config->get('rtname')}] Missing dashboard!
-
-Greetings,
-
-You are subscribed to a dashboard that is currently missing. Most likely, the dashboard was deleted.
-
-RT will remove this subscription as it is no longer useful. Here's the information RT had about your subscription:
-
-DashboardID: { $subscription_obj->sub_value('Dashboardid') }
-Frequency: { $subscription_obj->sub_value('Frequency') }
-Hour: { $subscription_obj->sub_value('Hour') }
-{
- $subscription_obj->sub_value('Frequency') eq 'weekly'
- ? "Day of week: " . $subscription_obj->sub_value('Dow')
- : $subscription_obj->sub_value('Frequency') eq 'monthly'
- ? "Day of month: " . $subscription_obj->sub_value('Dom')
- : ''
-}
-}
-},
);
@ACL = (
Modified: rt/3.999/branches/lorzy/lib/RT.pm
==============================================================================
--- rt/3.999/branches/lorzy/lib/RT.pm (original)
+++ rt/3.999/branches/lorzy/lib/RT.pm Wed Feb 18 07:46:11 2009
@@ -57,7 +57,7 @@
use warnings;
use File::Spec ();
use vars qw($Config $System $nobody $Handle $_install_mode);
-our $VERSION = '3.7.14';
+our $VERSION = '3.999.0';
our $BASE_PATH = Jifty::Util->app_root;
our $EtcPath = $BASE_PATH . '/etc';
Modified: rt/3.999/branches/lorzy/lib/RT/Dispatcher.pm
==============================================================================
--- rt/3.999/branches/lorzy/lib/RT/Dispatcher.pm (original)
+++ rt/3.999/branches/lorzy/lib/RT/Dispatcher.pm Wed Feb 18 07:46:11 2009
@@ -170,6 +170,16 @@
RT::Interface::Web::Handler::cleanup_request();
};
+on qr{^/Dashboards/(\d+)} => run {
+ Jifty->web->request->argument( id => $1 );
+ show( '/Dashboards/Render.html' );
+};
+
+on qr{^/Ticket/Graphs/(\d+)} => run {
+ Jifty->web->request->argument( id => $1 );
+ show( '/Ticket/Graphs/Render' );
+};
+
# Backward compatibility with old RT URLs
before '/NoAuth/Logout.html' => run { redirect '/logout' };
Modified: rt/3.999/branches/lorzy/lib/RT/Graph/Tickets.pm
==============================================================================
--- rt/3.999/branches/lorzy/lib/RT/Graph/Tickets.pm (original)
+++ rt/3.999/branches/lorzy/lib/RT/Graph/Tickets.pm Wed Feb 18 07:46:11 2009
@@ -111,67 +111,65 @@
our ( %fill_cache, @available_colors ) = ();
our %property_cb = (
- Queue => sub { return $_[0]->queue->name || $_[0]->queue },
- CF => sub {
+ queue => sub { return $_[0]->queue->name || $_[0]->queue },
+ cf => sub {
my $values = $_[0]->custom_field_values( $_[1] );
return join ', ', map $_->content, @{ $values->items_array_ref };
},
);
-foreach my $field (qw(Subject Status TimeLeft TimeWorked TimeEstimated)) {
+foreach my $field (qw(subject status time_left time_worked time_estimated)) {
$property_cb{$field} = sub { return $_[0]->$field },;
}
-foreach my $field (qw(Creator LastUpdatedBy Owner)) {
+foreach my $field (qw(creator last_updated_by owner)) {
$property_cb{$field} = sub {
- my $method = $field . 'Obj';
- return $_[0]->$method->name;
+ return $_[0]->$field->name;
};
}
-foreach my $field (qw(Requestor Cc AdminCc)) {
+foreach my $field (qw(requestor cc admin_cc)) {
$property_cb{ $field . "s" } = sub {
- my $method = $field . 'Addresses';
- return $_[0]->$method;
+ return $_[0]->role_group( $field )->member_emails;
};
}
-foreach my $field (qw(Told Starts Started Due Resolved LastUpdated Created)) {
+foreach my $field (qw(told starts started due resolved last_updated created)) {
$property_cb{$field} = sub {
- my $method = $field . 'Obj';
+ my $method = $field . '_obj';
return $_[0]->$method->as_string;
};
}
-foreach my $field (qw(Members DependedOnBy ReferredToBy)) {
+foreach my $field (qw(members depended_on_by referred_to_by)) {
$property_cb{$field} = sub {
return join ', ', map $_->base_obj->id,
@{ $_[0]->$field->items_array_ref };
};
}
-foreach my $field (qw(MemberOf DependsOn RefersTo)) {
+foreach my $field (qw(member_of depends_on refersTo)) {
$property_cb{$field} = sub {
return join ', ', map $_->target_obj->id,
@{ $_[0]->$field->items_array_ref };
};
}
-sub TicketProperties {
+sub ticket_properties {
my $self = shift;
my $user = shift;
my @res = (
- Basics => [qw(Subject Status queue TimeLeft TimeWorked TimeEstimated)]
+ basics => [qw(subject status queue time_left time_worked time_estimated)]
, # loc_qw
- People => [qw(Owner Requestors Ccs AdminCcs Creator LastUpdatedBy)]
+ people => [qw(owner requestors ccs admin_ccs creator last_updated_by)]
, # loc_qw
- Dates => [qw(Created Starts Started Due Resolved Told LastUpdated)]
+ dates => [qw(created starts started due resolved told last_updated)]
, # loc_qw
- Links =>
- [qw(MemberOf Members DependsOn DependedOnBy RefersTo ReferredToBy)]
+ links =>
+ [qw(member_of members depends_on depended_on_by refers_to referred_to_by)]
, # loc_qw
);
- my $cfs = RT::Model::CustomFieldCollection->new($user);
+ my $cfs = RT::Model::CustomFieldCollection->new(current_user => $user);
$cfs->limit_to_lookup_type('RT::Model::Queue-RT::Model::Ticket');
- $cfs->order_by( field => 'Name' );
+ $cfs->order_by( field => 'name' );
my ( $first, %seen ) = (1);
while ( my $cf = $cfs->next ) {
next if $seen{ lc $cf->name }++;
- next if $cf->type eq 'Image';
+ next if $cf->type eq 'image';
if ($first) {
push @res, 'CustomFields', [];
$first = 0;
@@ -181,7 +179,7 @@
return @res;
}
-sub _SplitProperty {
+sub _split_property {
my $self = shift;
my $property = shift;
my ( $key, @subkeys ) = split /\./, $property;
@@ -192,17 +190,17 @@
return $key, @subkeys;
}
-sub _PropertiesToFields {
+sub _properties_to_fields {
my $self = shift;
my %args = (
- Ticket => undef,
- Graph => undef,
- CurrentDepth => 1,
+ ticket => undef,
+ graph => undef,
+ current_depth => 1,
@_
);
my @properties;
- if ( my $tmp = $args{ 'Level-' . $args{'CurrentDepth'} . '-Properties' } ) {
+ if ( my $tmp = $args{ 'level-' . $args{'current_depth'} . '-properties' } ) {
@properties = ref $tmp ? @$tmp : ($tmp);
}
@@ -217,45 +215,45 @@
}
push @fields,
( $subkeys[0] || $key ) . ': '
- . $property_cb{$key}->( $args{'Ticket'}, @subkeys );
+ . $property_cb{$key}->( $args{'ticket'}, @subkeys );
}
return @fields;
}
-sub AddTicket {
+sub add_ticket {
my $self = shift;
my %args = (
- Ticket => undef,
- Properties => [],
- Graph => undef,
- CurrentDepth => 1,
+ ticket => undef,
+ properties => [],
+ graph => undef,
+ current_depth => 1,
@_
);
my %node_style = (
style => 'filled,rounded',
- %{ $ticket_status_style{ $args{'Ticket'}->status } || {} },
- URL => $RT::WebPath . '/Ticket/Display.html?id=' . $args{'Ticket'}->id,
+ %{ $ticket_status_style{ $args{'ticket'}->status } || {} },
+ URL => $RT::WebPath . '/Ticket/Display.html?id=' . $args{'ticket'}->id,
tooltip =>
- gv_escape( $args{'Ticket'}->subject || '#' . $args{'Ticket'}->id ),
+ gv_escape( $args{'ticket'}->subject || '#' . $args{'ticket'}->id ),
);
my @fields = $self->_properties_to_fields(%args);
if (@fields) {
- unshift @fields, $args{'Ticket'}->id;
+ unshift @fields, $args{'ticket'}->id;
my $label = join ' | ', map { s/(?=[{}|])/\\/g; $_ } @fields;
$label = "{ $label }"
- if ( $args{'Direction'} || 'TB' ) =~ /^(?:TB|BT)$/;
+ if ( $args{'direction'} || 'TB' ) =~ /^(?:TB|BT)$/;
$node_style{'label'} = gv_escape($label);
$node_style{'shape'} = 'record';
}
- if ( $args{'FillUsing'} ) {
- my ( $key, @subkeys ) = $self->_split_property( $args{'FillUsing'} );
+ if ( $args{'fill_using'} ) {
+ my ( $key, @subkeys ) = $self->_split_property( $args{'fill_using'} );
my $value;
if ( $property_cb{$key} ) {
- $value = $property_cb{$key}->( $args{'Ticket'}, @subkeys );
+ $value = $property_cb{$key}->( $args{'ticket'}, @subkeys );
}
else {
Jifty->log->error("Couldn't find property callback for '$key'");
@@ -274,35 +272,35 @@
}
}
- $args{'Graph'}->add_node( $args{'Ticket'}->id, %node_style );
+ $args{'graph'}->add_node( $args{'ticket'}->id, %node_style );
}
-sub TicketLinks {
+sub ticket_links {
my $self = shift;
my %args = (
- Ticket => undef,
+ ticket => undef,
- Graph => undef,
- Direction => 'TB',
- Seen => undef,
- SeenEdge => undef,
+ graph => undef,
+ direction => 'TB',
+ seen => undef,
+ seen_edge => undef,
- LeadingLink => 'Members',
- ShowLinks => [],
+ leading_link => 'members',
+ show_links => [],
- MaxDepth => 0,
- CurrentDepth => 1,
+ max_depth => 0,
+ current_depth => 1,
show_link_descriptions => 0,
@_
);
- unless ( $args{'Graph'} ) {
- $args{'Graph'} = GraphViz->new(
- name => 'ticket_links_' . $args{'Ticket'}->id,
+ unless ( $args{'graph'} ) {
+ $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",
+ rankdir => ( $args{'direction'} || "TB" ) eq "LR",
node => {
shape => 'box',
style => 'filled,rounded',
@@ -313,24 +311,24 @@
@available_colors = @fill_colors;
}
- $args{'Seen'} ||= {};
- return $args{'Graph'} if $args{'Seen'}{ $args{'Ticket'}->id }++;
+ $args{'seen'} ||= {};
+ return $args{'graph'} if $args{'seen'}{ $args{'ticket'}->id }++;
$self->add_ticket(%args);
- return $args{'Graph'}
- if $args{'MaxDepth'} && $args{'CurrentDepth'} >= $args{'MaxDepth'};
+ return $args{'graph'}
+ if $args{'max_depth'} && $args{'current_depth'} >= $args{'max_depth'};
- $args{'SeenEdge'} ||= {};
+ $args{'seen_edge'} ||= {};
my $show_link_descriptions = $args{'show_link_descriptions'}
&& RT::Model::Link->can('description');
- foreach my $type ( $args{'LeadingLink'}, @{ $args{'ShowLinks'} } ) {
- my $links = $args{'Ticket'}->$type();
+ foreach my $type ( $args{'leading_link'}, @{ $args{'show_links'} } ) {
+ my $links = $args{'ticket'}->$type();
$links->goto_first_item;
while ( my $link = $links->next ) {
- next if $args{'SeenEdge'}{ $link->id }++;
+ next if $args{'seen_edge'}{ $link->id }++;
my $target = $link->target_obj;
next unless $target && $target->isa('RT::Model::Ticket');
@@ -338,22 +336,22 @@
my $base = $link->base_obj;
next unless $base && $base->isa('RT::Model::Ticket');
- my $next = $target->id == $args{'Ticket'}->id ? $base : $target;
+ my $next = $target->id == $args{'ticket'}->id ? $base : $target;
$self->ticket_links(
%args,
- Ticket => $next,
- $type eq $args{'LeadingLink'}
- ? ( CurrentDepth => $args{'CurrentDepth'} + 1 )
+ ticket => $next,
+ $type eq $args{'leading_link'}
+ ? ( current_depth => $args{'current_depth'} + 1 )
: (
- MaxDepth => $args{'CurrentDepth'} + 1,
- CurrentDepth => $args{'CurrentDepth'} + 1
+ max_depth => $args{'current_depth'} + 1,
+ current_depth => $args{'current_depth'} + 1
),
);
my $desc;
$desc = $link->description if $show_link_descriptions;
- $args{'Graph'}->add_edge(
+ $args{'graph'}->add_edge(
# we revers order of member links to get better layout
$link->type eq 'MemberOf'
@@ -365,7 +363,7 @@
}
}
- return $args{'Graph'};
+ return $args{'graph'};
}
1;
Modified: rt/3.999/branches/lorzy/lib/RT/Model/TicketCollection.pm
==============================================================================
--- rt/3.999/branches/lorzy/lib/RT/Model/TicketCollection.pm (original)
+++ rt/3.999/branches/lorzy/lib/RT/Model/TicketCollection.pm Wed Feb 18 07:46:11 2009
@@ -100,9 +100,9 @@
Type => [ 'ENUM', ], #loc_left_pair
Creator => [ 'ENUM' => 'User', ], #loc_left_pair
LastUpdatedBy => [ 'ENUM' => 'User', ], #loc_left_pair
- Owner => [ 'WATCHERFIELD' => 'Owner', ], #loc_left_pair
+ Owner => [ 'WATCHERFIELD' => 'owner', ], #loc_left_pair
EffectiveId => [ 'INT', ], #loc_left_pair
- Id => [ 'INT', ], #loc_left_pair
+ Id => [ 'ID', ], #loc_left_pair
InitialPriority => [ 'INT', ], #loc_left_pair
FinalPriority => [ 'INT', ], #loc_left_pair
Priority => [ 'INT', ], #loc_left_pair
@@ -1527,7 +1527,7 @@
elsif (
( $meta->[0] eq 'ENUM' && ( $meta->[1] || '' ) eq 'User' )
|| ( $meta->[0] eq 'WATCHERFIELD'
- && ( $meta->[1] || '' ) eq 'Owner' )
+ && ( $meta->[1] || '' ) eq 'owner' )
)
{
my $alias = $self->join(
@@ -2217,7 +2217,7 @@
$join_roles = 0 if $join_roles == 1 && $roles{'Owner'};
my ( $role_group_alias, $cgm_alias );
if ($join_roles) {
- $role_group_alias = $self->_role_groupsjoin( New => 1 );
+ $role_group_alias = $self->_role_groupsjoin( new => 1 );
$cgm_alias =
$self->_group_membersjoin( groups_alias => $role_group_alias );
$self->SUPER::limit(
Modified: rt/3.999/branches/lorzy/lib/RT/View/Ticket.pm
==============================================================================
--- rt/3.999/branches/lorzy/lib/RT/View/Ticket.pm (original)
+++ rt/3.999/branches/lorzy/lib/RT/View/Ticket.pm Wed Feb 18 07:46:11 2009
@@ -107,8 +107,9 @@
template '_elements/edit_cfs' => sub {
my ( $ticket, $queue, $cfs );
- if ( get('id') ) {
- $ticket = HTML::Mason::Commands::load_ticket( get('id') );
+ my $id = get('id');
+ if ( $id && $id ne 'new' ) {
+ $ticket = HTML::Mason::Commands::load_ticket( $id );
$cfs = $ticket->custom_fields;
}
elsif ( get('queue') ) {
Modified: rt/3.999/branches/lorzy/share/html/Approvals/Elements/PendingMyApproval
==============================================================================
--- rt/3.999/branches/lorzy/share/html/Approvals/Elements/PendingMyApproval (original)
+++ rt/3.999/branches/lorzy/share/html/Approvals/Elements/PendingMyApproval Wed Feb 18 07:46:11 2009
@@ -45,10 +45,6 @@
%# those contributions and any derivatives thereof.
%#
%# END BPS TAGGED BLOCK }}}
-<script type="text/javascript"><!--
- onLoadHook('createCalendarLink("CreatedBefore");');
- onLoadHook('createCalendarLink("CreatedAfter");');
---></script>
% my %done;
% foreach ($tickets, $group_tickets) {
% while (my $ticket = $_->next() ) {
@@ -67,9 +63,9 @@
<input type="checkbox" class="checkbox" value="1" name="show_rejected" <% defined($ARGS{'show_rejected'}) && $ARGS{'show_rejected'} && qq[checked="checked"] |n%> /> <&|/l&>Show denied requests</&><br />
<input type="checkbox" class="checkbox" value="1" name="show_dependent" <% defined($ARGS{'show_dependent'}) && $ARGS{'show_dependent'} && qq[checked="checked"] |n%> /> <&|/l&>Show requests awaiting other approvals</&><br />
-<&|/l,"<input size='15' value='".($Created_before->unix > 0 &&$Created_before->iso)."' name='created_before' id='CreatedBefore' />"&>Only show approvals for requests Created before %1</&><br />
+<&|/l,"<input size='15' value='".($Created_before->unix > 0 &&$Created_before->iso)."' name='created_before' id='CreatedBefore' class='datetime' />"&>Only show approvals for requests Created before %1</&><br />
-<&|/l, "<input size='15' value='".( $Created_after->unix >0 && $Created_after->iso)."' name='created_after' id='CreatedAfter' />"&>Only show approvals for requests Created after %1</&>
+<&|/l, "<input size='15' value='".( $Created_after->unix >0 && $Created_after->iso)."' name='created_after' id='CreatedAfter' class='datetime' />"&>Only show approvals for requests Created after %1</&>
</&>
<%init>
Modified: rt/3.999/branches/lorzy/share/html/Elements/SelectDate
==============================================================================
--- rt/3.999/branches/lorzy/share/html/Elements/SelectDate (original)
+++ rt/3.999/branches/lorzy/share/html/Elements/SelectDate Wed Feb 18 07:46:11 2009
@@ -45,10 +45,7 @@
%# those contributions and any derivatives thereof.
%#
%# END BPS TAGGED BLOCK }}}
-<script type="text/javascript"><!--
- onLoadHook('createCalendarLink("<% $name %>");');
---></script>
-<input type="text" id="<% $name %>" name="<% $name %>" value="<% $value %>" size="<% $size %>" />
+<input type="text" id="<% $name %>" name="<% $name %>" class="datetime" value="<% $value %>" size="<% $size %>" />
<%init>
unless ((defined $default) or
($current <= 0)) {
Modified: rt/3.999/branches/lorzy/share/html/Ticket/Create.html
==============================================================================
--- rt/3.999/branches/lorzy/share/html/Ticket/Create.html (original)
+++ rt/3.999/branches/lorzy/share/html/Ticket/Create.html Wed Feb 18 07:46:11 2009
@@ -47,7 +47,7 @@
%# END BPS TAGGED BLOCK }}}
<&| /_elements/wrapper,
title => _("Create a new ticket"),
- onload => "function () { hide(document.getElementByid('Ticket-Create-details')) }" &>
+ onload => "function () { hide(document.getElementById('Ticket-Create-details')) }" &>
<& /Elements/Tabs,
current_toptab => "Ticket/Create.html",
title => _("Create a new ticket"),
Modified: rt/3.999/branches/lorzy/share/html/Ticket/Graphs/Elements/EditGraphProperties
==============================================================================
--- rt/3.999/branches/lorzy/share/html/Ticket/Graphs/Elements/EditGraphProperties (original)
+++ rt/3.999/branches/lorzy/share/html/Ticket/Graphs/Elements/EditGraphProperties Wed Feb 18 07:46:11 2009
@@ -57,7 +57,7 @@
<% _('Main type of links') %> <select name="leading_link">
% foreach ( @link_types ) {
-<option value="<% $_ %>" <% ($leading_link||'Members') eq $_? 'selected="selected"': '' |n %>><% _($_) %></option>
+<option value="<% $_ %>" <% ($leading_link||'members') eq $_? 'selected="selected"': '' |n %>><% _($_) %></option>
% }
</select>
@@ -106,7 +106,7 @@
<%PERL>
for my $i ( 1..($max_depth||6) ) {
my @default;
- if ( my $tmp = $ARGS{ 'Level-'. $i .'-Properties' } ) {
+ if ( my $tmp = $ARGS{ 'level-'. $i .'-properties' } ) {
@default = ref $tmp? @$tmp : ($tmp);
}
@@ -125,8 +125,8 @@
<%ARGS>
$id => undef
$direction => 'TB'
-$leading_link => 'Members'
- at show_links => ('MemberOf', 'DependsOn', 'RefersTo')
+$leading_link => 'members'
+ at show_links => ('member_of', 'depends_on', 'refers_to')
$max_depth => 3
$fill_using => ''
$show_link_descriptions => 0
@@ -135,7 +135,8 @@
require RT::Graph::Tickets;
require RT::Model::Link;
-my @link_types = qw(Members MemberOf RefersTo ReferredToBy DependsOn DependedOnBy); #loc_qw
+my @link_types = qw(members member_of refers_to referred_to_by depends_on
+depended_on_by); #loc_qw
@show_links = grep $_ ne $leading_link, @show_links;
</%INIT>
@@ -150,7 +151,7 @@
my $class = '';
$class = 'class="hidden"' if $level != 1 && !@default;
</%INIT>
-<% _('Show Tickets Properties on %1 level', $Level) %>
+<% _('Show Tickets Properties on %1 level', $level) %>
(<small><a href="#" onclick="hideshow('<% $id %>'); return false;"><% _('open/close') %></a></small>):
<table id="<% $id %>" <% $class |n %>>
% while ( my ($group, $list) = (splice @available, 0, 2) ) {
@@ -158,7 +159,7 @@
% foreach my $prop ( @$list ) {
% my $checked = '';
% $checked = 'checked="checked"' if grep $_ eq $prop, @default;
-<input type="checkbox" class="checkbox" name="Level-<% $Level %>-Properties" value="<% $prop %>" <% $checked |n %> /><% _($prop) %>
+<input type="checkbox" class="checkbox" name="level-<% $level %>-properties" value="<% $prop %>" <% $checked |n %> /><% _($prop) %>
% }
</td></tr>
% }
Added: rt/3.999/branches/lorzy/share/html/Ticket/Graphs/Render
==============================================================================
--- (empty file)
+++ rt/3.999/branches/lorzy/share/html/Ticket/Graphs/Render Wed Feb 18 07:46:11 2009
@@ -0,0 +1,74 @@
+%# BEGIN BPS TAGGED BLOCK {{{
+%#
+%# COPYRIGHT:
+%#
+%# This software is Copyright (c) 1996-2008 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 $ticket = RT::Model::Ticket->new( current_user => Jifty->web->current_user );
+$ticket->load( $id );
+unless ( $ticket->id ) {
+ Jifty->log->error("Couldn't load ticket #$id");
+ return $m->abort( 404 );
+}
+
+require RT::Graph::Tickets;
+my $graph = RT::Graph::Tickets->ticket_links(
+ %ARGS,
+ ticket => $ticket,
+);
+
+$r->content_type( 'image/png' );
+$m->clear_buffer;
+
+my $png;
+safe_run_child { $graph->as_png(\$png) };
+$m->out( $png );
+
+$m->abort;
+
+</%INIT>
+<%ARGS>
+$id
+</%ARGS>
Modified: rt/3.999/branches/lorzy/share/html/Ticket/Graphs/index.html
==============================================================================
--- rt/3.999/branches/lorzy/share/html/Ticket/Graphs/index.html (original)
+++ rt/3.999/branches/lorzy/share/html/Ticket/Graphs/index.html Wed Feb 18 07:46:11 2009
@@ -95,11 +95,11 @@
my $ticket = load_ticket( $id );
$ARGS{'id'} = $id = $ticket->id;
-$ARGS{'leading_link'} ||= 'Members';
+$ARGS{'leading_link'} ||= 'members';
if ( $ARGS{'show_links'} && !ref $ARGS{'show_links'} ) {
$ARGS{'show_links'} = [$ARGS{'show_links'}];
} elsif ( !$ARGS{'show_links'} ) {
- $ARGS{'show_links'} = [ qw(MemberOf DependsOn RefersTo) ];
+ $ARGS{'show_links'} = [ qw(member_of depends_on refers_to) ];
}
$ARGS{'show_links'} = [ grep $_ ne $ARGS{'leading_link'}, @{ $ARGS{'show_links'} } ];
$ARGS{'max_depth'} = 3 unless defined $ARGS{'max_depth'} && length $ARGS{'max_depth'};
Modified: rt/3.999/branches/lorzy/share/web/static/css/forms.css
==============================================================================
--- rt/3.999/branches/lorzy/share/web/static/css/forms.css (original)
+++ rt/3.999/branches/lorzy/share/web/static/css/forms.css Wed Feb 18 07:46:11 2009
@@ -31,6 +31,10 @@
padding-right: 0.5em;
}
+div.submit_button {
+ text-align: right;
+ padding-right: 0.5em;
+}
input[type=reset], input[type=submit], input[class=button] {
color: #fff;
Modified: rt/3.999/branches/lorzy/share/web/static/css/login.css
==============================================================================
--- rt/3.999/branches/lorzy/share/web/static/css/login.css (original)
+++ rt/3.999/branches/lorzy/share/web/static/css/login.css Wed Feb 18 07:46:11 2009
@@ -1,7 +1,3 @@
-#login-box hr {
- display: none;
-}
-
#login-box {
width: 30em;
@@ -14,17 +10,17 @@
}
-#login-box .input-row {
+#login-box .form_field {
position: relative;
height: 1.5em;
padding-top: 1em;
}
-#login-box .input-row .label {
+#login-box .form_field label {
position: absolute;
- left:0em;
- width: 5.5em;
+ left: 0em;
+ width: 8.5em;
text-align: right;
font-weight: bold;
@@ -32,8 +28,14 @@
}
-#login-box .input-row .input {
+#login-box .form_field input {
+ position: absolute;
+ left:9em;
+}
+
+#login-box .form_field .hints {
position: absolute;
- left:6em;
+ left: 12em;
+ font-size: 0.8em;
}
Modified: rt/3.999/branches/lorzy/share/web/static/js/util.js
==============================================================================
--- rt/3.999/branches/lorzy/share/web/static/js/util.js (original)
+++ rt/3.999/branches/lorzy/share/web/static/js/util.js Wed Feb 18 07:46:11 2009
@@ -142,45 +142,10 @@
}
}
-
-/* onload handlers */
-
-var onLoadStack = new Array();
-var onLoadLastStack = new Array();
-var onLoadExecuted = 0;
-
-function onLoadHook(commandStr) {
- if(typeof(commandStr) == "string") {
- onLoadStack[ onLoadStack.length ] = commandStr;
- return true;
- }
- return false;
-}
-
-// some things *really* need to be done after everything else
-function onLoadLastHook(commandStr) {
- if(typeof(commandStr) == "string"){
- onLoadLastStack[onLoadLastStack.length] = commandStr;
- return true;
- }
- return false;
+function doOnLoad(handler) {
+ Event.observe(window, 'load', handler);
}
-function doOnLoadHooks() {
- if(onLoadExecuted) return;
-
- var i;
- for ( i in onLoadStack ) {
- eval( onLoadStack[i] );
- }
- for ( i in onLoadLastStack ) {
- eval( onLoadLastStack[i] );
- }
- onLoadExecuted = 1;
-}
-
-window.onload = doOnLoadHooks;
-
/* other utils */
function focusElementById(id) {
Modified: rt/3.999/branches/lorzy/t/ticket/search_by_watcher.t
==============================================================================
--- rt/3.999/branches/lorzy/t/ticket/search_by_watcher.t (original)
+++ rt/3.999/branches/lorzy/t/ticket/search_by_watcher.t Wed Feb 18 07:46:11 2009
@@ -133,24 +133,6 @@
'Subject NOT LIKE "x" OR Requestor != "not-exist at example.com"' =>
{ xy => 1, x => 1, y => 1, '-' => 1, z => 1 },
-# group of cases when user doesn't exist in DB at all
- 'Subject LIKE "x" AND Requestor = "not-exist at example.com"' =>
- { xy => 0, x => 0, y => 0, '-' => 0, z => 0 },
- 'Subject NOT LIKE "x" AND Requestor = "not-exist at example.com"' =>
- { xy => 0, x => 0, y => 0, '-' => 0, z => 0 },
- 'Subject LIKE "x" AND Requestor != "not-exist at example.com"' =>
- { xy => 1, x => 1, y => 0, '-' => 0, z => 0 },
- 'Subject NOT LIKE "x" AND Requestor != "not-exist at example.com"' =>
- { xy => 0, x => 0, y => 1, '-' => 1, z => 1 },
-# 'Subject LIKE "x" OR Requestor = "not-exist at example.com"' =>
-# { xy => 1, x => 1, y => 0, '-' => 0, z => 0 },
-# 'Subject NOT LIKE "x" OR Requestor = "not-exist at example.com"' =>
-# { xy => 0, x => 0, y => 1, '-' => 1, z => 1 },
- 'Subject LIKE "x" OR Requestor != "not-exist at example.com"' =>
- { xy => 1, x => 1, y => 1, '-' => 1, z => 1 },
- 'Subject NOT LIKE "x" OR Requestor != "not-exist at example.com"' =>
- { xy => 1, x => 1, y => 1, '-' => 1, z => 1 },
-
'Subject LIKE "z" AND (Requestor = "x at example.com" OR Requestor = "y at example.com")' =>
{ xy => 0, x => 0, y => 0, '-' => 0, z => 0 },
'Subject NOT LIKE "z" AND (Requestor = "x at example.com" OR Requestor = "y at example.com")' =>
More information about the Rt-commit
mailing list