From 57584dc4744fea59833ef355f7513690d246c70f Mon Sep 17 00:00:00 2001 From: David Lawrence Date: Tue, 4 Oct 2011 18:25:23 -0400 Subject: more porting work --- extensions/Splinter/lib/Util.pm | 22 +++-- .../template/en/default/pages/splinter.html.tmpl | 13 ++- .../en/default/pages/splinter/help.html.tmpl | 54 ++++++------ extensions/Splinter/web/splinter.css | 13 +++ extensions/Splinter/web/splinter.js | 97 ++++++++++++++++++++-- 5 files changed, 145 insertions(+), 54 deletions(-) (limited to 'extensions/Splinter') diff --git a/extensions/Splinter/lib/Util.pm b/extensions/Splinter/lib/Util.pm index c8c0d52d2..1861d7ab6 100644 --- a/extensions/Splinter/lib/Util.pm +++ b/extensions/Splinter/lib/Util.pm @@ -21,8 +21,6 @@ package Bugzilla::Extension::Splinter::Util; -use strict; - use Bugzilla; use Bugzilla::Util; @@ -68,9 +66,9 @@ sub get_review_url { my $bug_id = $bug->id; if (defined $absolute && $absolute) { - my $urlbase = correct_urlbase(); - $urlbase =~ s!/$!! if $base =~ "^/"; - $base = $urlbase . $base; + my $urlbase = correct_urlbase(); + $urlbase =~ s!/$!! if $base =~ "^/"; + $base = $urlbase . $base; } if ($base =~ /\?/) { @@ -95,12 +93,12 @@ sub munge_create_attachment { my ($bug, $intro_text, $attach_id, $view_link) = @_; if (attachment_id_is_patch ($attach_id)) { - return ("$intro_text" . + return ("$intro_text" . " View: $view_link\015\012" . " Review: " . get_review_url($bug, $attach_id, 1) . "\015\012"); } else { - return ("$intro_text --> ($view_link)"); + return ("$intro_text --> ($view_link)"); } } @@ -117,24 +115,24 @@ sub add_review_links_to_email { if ($email->header('Subject') =~ /^\[Bug\s+(\d+)\]/ && Bugzilla->user->can_see_bug($1)) { - $bug = Bugzilla::Bug->new($1); + $bug = Bugzilla::Bug->new($1); } return unless defined $bug; if ($body =~ /Review\s+of\s+attachment\s+\d+\s*:/) { - $body =~ s~(Review\s+of\s+attachment\s+(\d+)\s*:) + $body =~ s~(Review\s+of\s+attachment\s+(\d+)\s*:) ~"$1\015\012 --> (" . get_review_url($bug, $2, 1) . ")" ~egx; - $new_body = 1; + $new_body = 1; } if ($body =~ /Created attachment \d+\015\012 --> /) { - $body =~ s~(Created\ attachment\ (\d+)\015\012) + $body =~ s~(Created\ attachment\ (\d+)\015\012) \ -->\ \(([^\015\012]*)\)[^\015\012]* ~munge_create_attachment($bug, $1, $2, $3) ~egx; - $new_body = 1; + $new_body = 1; } $email->body_set($body) if $new_body; diff --git a/extensions/Splinter/template/en/default/pages/splinter.html.tmpl b/extensions/Splinter/template/en/default/pages/splinter.html.tmpl index a05cc87f9..4728967c7 100644 --- a/extensions/Splinter/template/en/default/pages/splinter.html.tmpl +++ b/extensions/Splinter/template/en/default/pages/splinter.html.tmpl @@ -16,7 +16,6 @@ # Red Hat, Inc. All Rights Reserved. # # Contributor(s): Owen Taylor - # David Lawrence #%] [% PROCESS global/header.html.tmpl @@ -27,7 +26,6 @@ "js/yui/assets/skins/sam/datatable.css", "extensions/Splinter/web/splinter.css" ] javascript_urls = [ "js/yui/element/element-min.js", - "js/yui/connection/connection-min.js", "js/yui/container/container-min.js", "js/yui/button/button-min.js", "js/yui/json/json-min.js", @@ -40,7 +38,7 @@