[Rt-commit] rt branch, new-style-templates, created. rt-3.8.8-176-g683e744

Shawn Moore sartak at bestpractical.com
Mon Jul 19 16:54:40 EDT 2010


The branch, new-style-templates has been created
        at  683e7442f3f11f33346778ca47274b995e27b32c (commit)

- Log -----------------------------------------------------------------
commit 7b8bcff9e419200b0e6f51169cc7c6c4eb1f3704
Author: Alex Vandiver <alexmv at bestpractical.com>
Date:   Fri Jul 9 17:32:23 2010 -0400

    Give the input an ID -- this fixes the javascript associated with /Ticket/Elements/UpdateCc

diff --git a/share/html/Elements/EmailInput b/share/html/Elements/EmailInput
index 5c7f277..1932ef8 100644
--- a/share/html/Elements/EmailInput
+++ b/share/html/Elements/EmailInput
@@ -45,7 +45,7 @@
 %# those contributions and any derivatives thereof.
 %# 
 %# END BPS TAGGED BLOCK }}}
-<input name="<% $Name %>" size="<% $Size %>" value="<% $Default || '' %>" />
+<input id="<% $Name %>" name="<% $Name %>" size="<% $Size %>" value="<% $Default || '' %>" />
 <%ARGS>
 $Name
 $Size    => 40

commit 19c9ce303999a2fe129562d20387b61fbbfdff75
Author: Shawn M Moore <sartak at bestpractical.com>
Date:   Mon Jul 12 21:51:23 2010 -0400

    Respect the target attribute in the Menu

diff --git a/share/html/Elements/Menu b/share/html/Elements/Menu
index 83644da..717e788 100755
--- a/share/html/Elements/Menu
+++ b/share/html/Elements/Menu
@@ -61,6 +61,7 @@ my @tabs = sort keys %$toptabs;
 
      my $current = $current_toptab || '';
      my $path    = $toptabs->{$tab}->{'path'} || "";
+     my $target  = $toptabs->{$tab}->{'target'} || "";
      
      $path    =~ s#/index.html$##gi;
      $current =~ s#/index.html$##gi;
@@ -98,6 +99,7 @@ my @tabs = sort keys %$toptabs;
     <% $count > 1 && !$postsep && qq[<span class="bullet">&#183; </span>]|n%>
     <a href="<% $url %>"
       <% $class->{a} && qq[ class="$class->{a}"] |n %>
+      <% $target && qq[ target="$target"] |n %>
       <% !$level && " accesskey='".$accesskey++."'" |n %>>
     <% $toptabs->{$tab}->{'title'}%></a>
 

commit bd7b180e139b6fee4019609ebae5ab68c999356b
Author: sunnavy <sunnavy at bestpractical.com>
Date:   Wed Jul 14 11:04:53 2010 +0800

    to avoid long unbreaking text

diff --git a/share/html/NoAuth/css/web2/ticket.css b/share/html/NoAuth/css/web2/ticket.css
index 78477e0..93dc877 100644
--- a/share/html/NoAuth/css/web2/ticket.css
+++ b/share/html/NoAuth/css/web2/ticket.css
@@ -133,6 +133,7 @@ div#ticket-history div.content {
  min-height: 2.5em;
  /* To avoid overlapping of "downloadattachment" by messagebody */
  clear: left;
+ word-wrap: break-word;
 }
 
 .ticket-transaction .messagebody img {

commit edbf887976426d4bd3d3e13135ca2d2af47cf9f2
Author: Shawn M Moore <sartak at bestpractical.com>
Date:   Wed Jul 14 19:33:57 2010 -0400

    Add a callback for adding attributes to the CreateTicket <form>

diff --git a/share/html/Elements/CreateTicket b/share/html/Elements/CreateTicket
index fd2ba9e..2be5ab8 100755
--- a/share/html/Elements/CreateTicket
+++ b/share/html/Elements/CreateTicket
@@ -45,7 +45,14 @@
 %# those contributions and any derivatives thereof.
 %# 
 %# END BPS TAGGED BLOCK }}}
-<form action="<% RT->Config->Get('WebPath') %><% $SendTo %>" name="CreateTicketInQueue" id="CreateTicketInQueue">
+
+<form
+    action="<% RT->Config->Get('WebPath') %><% $SendTo %>"
+    name="CreateTicketInQueue"
+    id="CreateTicketInQueue"
+% $m->callback(CallbackName => 'InFormElement');
+>
+
 <&|/l, $m->scomp('/Elements/SelectNewTicketQueue', OnChange => 'document.CreateTicketInQueue.submit()', SendTo => $SendTo ) &><input type="submit" class="button" value="New ticket in" />&nbsp;[_1]</&>
 </form>
 <%ARGS>

commit b93716a7c7b36b88e57e56dab30d6a6b6bf2ca85
Author: Shawn M Moore <sartak at bestpractical.com>
Date:   Wed Jul 14 20:15:38 2010 -0400

    Add a callback for attributes for QuickCreate's <form>

diff --git a/share/html/Elements/QuickCreate b/share/html/Elements/QuickCreate
index 45e2e2f..a767b50 100644
--- a/share/html/Elements/QuickCreate
+++ b/share/html/Elements/QuickCreate
@@ -47,7 +47,11 @@
 %# END BPS TAGGED BLOCK }}}
 <div class="quick-create">
 <&| /Widgets/TitleBox, title => loc('Quick ticket creation') &>
-<form method="post" action="<%RT->Config->Get('WebPath')%>/index.html">
+<form
+    method="post"
+    action="<%RT->Config->Get('WebPath')%>/index.html"
+% $m->callback(CallbackName => 'InFormElement');
+>
 <input type="hidden" class="hidden" name="QuickCreate" value="1" />
 <table>
 <tr class="input-row"><td class="label"><&|/l&>Subject</&>:</td>

commit d83e0f636e2e3b789a0c5e7a5c25e157b9c11dc4
Author: Shawn M Moore <sartak at bestpractical.com>
Date:   Thu Jul 15 18:22:28 2010 -0400

    Makes members in group "user rights" page html links to adminuser page.

diff --git a/share/html/Admin/Groups/UserRights.html b/share/html/Admin/Groups/UserRights.html
index 619a076..c049363 100755
--- a/share/html/Admin/Groups/UserRights.html
+++ b/share/html/Admin/Groups/UserRights.html
@@ -60,7 +60,11 @@
 % while ( my $Member = $Users->Next ) {
 % my $UserObj = $Member->MemberObj->Object;
   <tr align="right">
-    <td valign="top"><& /Elements/ShowUser, User => $UserObj &></td>
+      <td valign="top">
+          <a href="<% RT->Config->Get('WebPath') %>/Admin/Users/Modify.html?id=<% $UserObj->id %>">
+              <& /Elements/ShowUser, User => $UserObj &>
+          </a></li>
+      </td>
     <td><& /Admin/Elements/SelectRights,
         PrincipalId => $Member->MemberObj->Id,
         PrincipalType => 'User',

commit b4aebcf01efdc91ee7e70eea5890d20647fb9198
Author: Shawn M Moore <sartak at bestpractical.com>
Date:   Thu Jul 15 18:28:38 2010 -0400

    Remove stray </li>

diff --git a/share/html/Admin/Groups/UserRights.html b/share/html/Admin/Groups/UserRights.html
index c049363..78b523a 100755
--- a/share/html/Admin/Groups/UserRights.html
+++ b/share/html/Admin/Groups/UserRights.html
@@ -63,7 +63,7 @@
       <td valign="top">
           <a href="<% RT->Config->Get('WebPath') %>/Admin/Users/Modify.html?id=<% $UserObj->id %>">
               <& /Elements/ShowUser, User => $UserObj &>
-          </a></li>
+          </a>
       </td>
     <td><& /Admin/Elements/SelectRights,
         PrincipalId => $Member->MemberObj->Id,

commit 78044b3724db6356af2954710fff45b6d5599db8
Merge: b4aebcf 3f9318c
Author: Shawn M Moore <sartak at bestpractical.com>
Date:   Thu Jul 15 18:33:35 2010 -0400

    Merge branch '3.8-trunk' into 3.9-trunk


commit 54c0d9b635603f1fd53d17777a8b44b59c03abb3
Author: Shawn M Moore <sartak at bestpractical.com>
Date:   Thu Jul 15 18:46:53 2010 -0400

    Doc typo fix

diff --git a/lib/RT/Template_Overlay.pm b/lib/RT/Template_Overlay.pm
index fce37bc..324bf0b 100755
--- a/lib/RT/Template_Overlay.pm
+++ b/lib/RT/Template_Overlay.pm
@@ -118,7 +118,7 @@ sub _Value {
 
 }
 
-=head2 Load <identifer>
+=head2 Load <identifier>
 
 Load a template, either by number or by name.
 

commit fae1ed4bee381d96b27442fe1df484d05cba657d
Author: Shawn M Moore <sartak at bestpractical.com>
Date:   Thu Jul 15 20:40:29 2010 -0400

    Drop the .html from the TicketHistory
    
        This makes t/web/compilation_errors.t pass again since it hits every
        .html page, but this template is not meant to be a regular endpoint

diff --git a/share/html/Helpers/TicketHistory.html b/share/html/Helpers/TicketHistory
similarity index 100%
rename from share/html/Helpers/TicketHistory.html
rename to share/html/Helpers/TicketHistory
diff --git a/share/html/Ticket/Elements/ClickToShowHistory b/share/html/Ticket/Elements/ClickToShowHistory
index 85471f3..41856c1 100644
--- a/share/html/Ticket/Elements/ClickToShowHistory
+++ b/share/html/Ticket/Elements/ClickToShowHistory
@@ -55,5 +55,5 @@ $Ticket
 </%ARGS>
 <%INIT>
 my $id = $Ticket->id;
-my $url = RT->Config->Get('WebPath') ."/Helpers/TicketHistory.html?id=". $id;
+my $url = RT->Config->Get('WebPath') ."/Helpers/TicketHistory?id=". $id;
 </%INIT>

commit e3b68b210a1f1a7837eb96e53084e587d0119db0
Author: Shawn M Moore <sartak at bestpractical.com>
Date:   Thu Jul 15 20:46:53 2010 -0400

    Attempt to include some diagnostics in compilation_errors

diff --git a/t/web/compilation_errors.t b/t/web/compilation_errors.t
index 46a8628..e8cfca7 100644
--- a/t/web/compilation_errors.t
+++ b/t/web/compilation_errors.t
@@ -60,7 +60,11 @@ sub test_get {
         is ($agent->{'status'}, 200, "Loaded $file");
 #        ok( $agent->{'content'} =~ /Logout/i, "Found a logout link on $file ");
         ok( $agent->{'content'} !~ /Not logged in/i, "Still logged in for  $file");
-        ok( $agent->{'content'} !~ /raw error/i, "Didn't get a Mason compilation error on $file");
+        ok( $agent->{'content'} !~ /raw error/i, "Didn't get a Mason compilation error on $file") or do {
+            if (my ($error) = $agent->{'content'} =~ /<pre>(.*)/) {
+                diag "$file: $error";
+            }
+        };
 }
 
 # }}}

commit 29197738ef8c6d6cc5672acc88ff7b60464acde6
Author: Shawn M Moore <sartak at bestpractical.com>
Date:   Thu Jul 15 21:28:38 2010 -0400

    Add CSS classes to category fields in custom field administration

diff --git a/share/html/Admin/Elements/AddCustomFieldValue b/share/html/Admin/Elements/AddCustomFieldValue
index 9fe464a..c0bd9aa 100755
--- a/share/html/Admin/Elements/AddCustomFieldValue
+++ b/share/html/Admin/Elements/AddCustomFieldValue
@@ -54,7 +54,7 @@
 <th><&|/l&>Name</&></th>
 <th><&|/l&>Description</&></th>
 % if ( $CustomField->Type ne 'Combobox' ) {
-<th><&|/l&>Category</&></th>
+<th class="categoryheader"><&|/l&>Category</&></th>
 % }
 </tr>
 
@@ -68,13 +68,13 @@
 % my $BasedOnObj = $CustomField->BasedOnObj;
 % if ( $BasedOnObj and $BasedOnObj->id ) {
 % my $Categories = $BasedOnObj->Values;
-<select name="<% $paramtag %>-Category" size="1">
+<select class="editcategory" name="<% $paramtag %>-Category" size="1">
 <option value=""><&|/l&>(no value)</&></option>
 % while (my $Value = $Categories->Next) {
 <option value="<% $Value->Name %>"><% $Value->Name %></option>
 % }
 %   } else {
-<input type="text" size="10" name="<% $paramtag %>-Category" value="" />
+<input type="text" size="10" class="editcategory" name="<% $paramtag %>-Category" value="" />
 %   }
 </td>
 % }
diff --git a/share/html/Admin/Elements/EditCustomFieldValues b/share/html/Admin/Elements/EditCustomFieldValues
index 96610b2..91f80ab 100755
--- a/share/html/Admin/Elements/EditCustomFieldValues
+++ b/share/html/Admin/Elements/EditCustomFieldValues
@@ -58,7 +58,7 @@
 <th><&|/l&>Name</&></th>
 <th><&|/l&>Description</&></th>
 % if ($CustomField->Type ne 'Combobox') {
-<th><&|/l&>Category</&></th>
+<th class="categoryheader"><&|/l&>Category</&></th>
 % }
 </tr>
 
@@ -74,13 +74,13 @@
 %   if ( $Categories ) {
 % my $selected = $value->Category;
 % $selected = '' unless defined $selected;
-<select name="<% $paramtag %>-Category" size="1">
+<select class="editcategory" name="<% $paramtag %>-Category" size="1">
 <option value=""<% $selected eq '' ? q[ selected="selected"] : "" |n%>><&|/l&>(no value)</&></option>
 % while (my $Value = $Categories->Next) {
 <option value="<% $Value->Name %>"<% $selected eq $Value->Name ? q[ selected="selected"] : "" |n%>><% $Value->Name %></option>
 % }
 %   } else {
-<input type="text" size="10" name="<% $paramtag %>-Category" value="<% $value->Category || '' %>" />
+<input type="text" size="10" class="editcategory" name="<% $paramtag %>-Category" value="<% $value->Category || '' %>" />
 %   }
 </td>
 % }

commit 37d11026ae08d6992ce0bdcdd226af7359107390
Author: Shawn M Moore <sartak at bestpractical.com>
Date:   Fri Jul 16 15:59:53 2010 -0400

    Add callback for the end of the CF Modify table

diff --git a/share/html/Admin/CustomFields/Modify.html b/share/html/Admin/CustomFields/Modify.html
index 5662226..9bdd6f7 100644
--- a/share/html/Admin/CustomFields/Modify.html
+++ b/share/html/Admin/CustomFields/Modify.html
@@ -124,6 +124,8 @@
 <&|/l&>Enabled (Unchecking this box disables this custom field)</&>
 </td></tr>
 
+% $m->callback(CallbackName => 'EndOfTable', CustomField => $CustomFieldObj);
+
 </table>
 
 % if ( $CustomFieldObj->Id && $CustomFieldObj->IsSelectionType && !$CustomFieldObj->IsExternalValues ) {

commit b36e63ba8f4f8ee077a1d2f1262f06844e5ef370
Author: Shawn M Moore <sartak at bestpractical.com>
Date:   Fri Jul 16 16:08:55 2010 -0400

    Add callbacks to customfield list

diff --git a/share/html/Admin/CustomFields/index.html b/share/html/Admin/CustomFields/index.html
index 16fb593..b859e38 100644
--- a/share/html/Admin/CustomFields/index.html
+++ b/share/html/Admin/CustomFields/index.html
@@ -84,6 +84,8 @@
 <&|/l&>Include disabled custom fields in listing.</&>
 <br />
 
+% $m->callback(CallbackName => 'BeforeSubmit');
+
 <input type="submit" value="<% loc('Go!') %>" />
 </form>
 
@@ -107,6 +109,8 @@ $CustomFields->UnLimit;
 $CustomFields->FindAllRows if $ShowDisabled;
 $CustomFields->LimitToLookupType( $Type ) if $Type;
 
+$m->callback(CallbackName => 'MassageCustomFields', CustomFields => $CustomFields);
+
 $Format ||= RT->Config->Get('AdminSearchResultFormat')->{'CustomFields'};
 
 </%INIT>

commit 03fd1f57f6042cbcfe7c5e9bd3eb74f1c40fc875
Author: Shawn M Moore <sartak at bestpractical.com>
Date:   Fri Jul 16 16:17:23 2010 -0400

    Fix doc for CustomFields->NewItem

diff --git a/lib/RT/CustomFields_Overlay.pm b/lib/RT/CustomFields_Overlay.pm
index a672b3c..b876c6f 100755
--- a/lib/RT/CustomFields_Overlay.pm
+++ b/lib/RT/CustomFields_Overlay.pm
@@ -330,9 +330,9 @@ sub Next {
     return $CF;
 }
 
-=head2 Next
+=head2 NewItem
 
-Overrides <RT::SearchBuilder/Next> to make sure </ContextObject>
+Overrides <RT::SearchBuilder/NewItem> to make sure </ContextObject>
 is inherited.
 
 =cut

commit 4e3a3598e897746814929f192e1e88fad7e6ea78
Author: Shawn M Moore <sartak at bestpractical.com>
Date:   Fri Jul 16 16:52:49 2010 -0400

    Add CustomFields->LimitToApplied

diff --git a/lib/RT/CustomFields_Overlay.pm b/lib/RT/CustomFields_Overlay.pm
index b876c6f..68f896f 100755
--- a/lib/RT/CustomFields_Overlay.pm
+++ b/lib/RT/CustomFields_Overlay.pm
@@ -189,6 +189,41 @@ sub LimitToNotApplied {
     );
 }
 
+=head2 LimitToApplied
+
+Limits collection to custom fields to listed objects or any corespondingly. Use
+zero to mean global.
+
+=cut
+
+sub LimitToApplied {
+    my $self = shift;
+    my @ids = @_;
+
+    my $ocfs_alias = $self->_OCFAlias( New => 1, Left => 1 );
+    if ( @ids ) {
+        # XXX: we need different EA in join clause, but DBIx::SB
+        # doesn't support them, use IN (X) instead
+        my $dbh = $self->_Handle->dbh;
+        $self->Limit(
+            LEFTJOIN   => $ocfs_alias,
+            ALIAS      => $ocfs_alias,
+            FIELD      => 'ObjectId',
+            OPERATOR   => 'IN',
+            QUOTEVALUE => 0,
+            VALUE      => "(". join( ',', map $dbh->quote($_), @ids ) .")",
+        );
+    }
+
+    $self->Limit(
+        ENTRYAGGREGATOR => 'AND',
+        ALIAS    => $ocfs_alias,
+        FIELD    => 'id',
+        OPERATOR => 'IS NOT',
+        VALUE    => 'NULL',
+    );
+}
+
 =head2 LimitToGlobalOrQueue QUEUEID
 
 DEPRECATED since CFs are applicable not only to tickets these days.

commit 683e7442f3f11f33346778ca47274b995e27b32c
Author: Shawn M Moore <sartak at bestpractical.com>
Date:   Fri Jul 16 16:54:43 2010 -0400

    Factor out the commonality between CFs->LimitToNotApplied and LimitToApplied

diff --git a/lib/RT/CustomFields_Overlay.pm b/lib/RT/CustomFields_Overlay.pm
index 68f896f..26e6b5e 100755
--- a/lib/RT/CustomFields_Overlay.pm
+++ b/lib/RT/CustomFields_Overlay.pm
@@ -153,15 +153,7 @@ sub LimitToGlobalOrObjectId {
                  ENTRYAGGREGATOR => 'OR' ) unless $global_only;
 }
 
-=head2 LimitToNotApplied
-
-Takes either list of object ids or nothing. Limits collection
-to custom fields to listed objects or any corespondingly. Use
-zero to mean global.
-
-=cut
-
-sub LimitToNotApplied {
+sub _LimitToOCFs {
     my $self = shift;
     my @ids = @_;
 
@@ -180,6 +172,23 @@ sub LimitToNotApplied {
         );
     }
 
+    return $ocfs_alias;
+}
+
+=head2 LimitToNotApplied
+
+Takes either list of object ids or nothing. Limits collection
+to custom fields to listed objects or any corespondingly. Use
+zero to mean global.
+
+=cut
+
+sub LimitToNotApplied {
+    my $self = shift;
+    my @ids = @_;
+
+    my $ocfs_alias = $self->_LimitToOCFs(@ids);
+
     $self->Limit(
         ENTRYAGGREGATOR => 'AND',
         ALIAS    => $ocfs_alias,
@@ -200,20 +209,7 @@ sub LimitToApplied {
     my $self = shift;
     my @ids = @_;
 
-    my $ocfs_alias = $self->_OCFAlias( New => 1, Left => 1 );
-    if ( @ids ) {
-        # XXX: we need different EA in join clause, but DBIx::SB
-        # doesn't support them, use IN (X) instead
-        my $dbh = $self->_Handle->dbh;
-        $self->Limit(
-            LEFTJOIN   => $ocfs_alias,
-            ALIAS      => $ocfs_alias,
-            FIELD      => 'ObjectId',
-            OPERATOR   => 'IN',
-            QUOTEVALUE => 0,
-            VALUE      => "(". join( ',', map $dbh->quote($_), @ids ) .")",
-        );
-    }
+    my $ocfs_alias = $self->_LimitToOCFs(@ids);
 
     $self->Limit(
         ENTRYAGGREGATOR => 'AND',

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


More information about the Rt-commit mailing list