[Rt-commit] rtir branch, 4.0/smaller-action-buttons, created. 4.0.1rc1-58-gd5a8b9f1

? sunnavy sunnavy at bestpractical.com
Mon Apr 9 13:50:08 EDT 2018


The branch, 4.0/smaller-action-buttons has been created
        at  d5a8b9f1245d716d7bdc39216a8a9658b80b9e59 (commit)

- Log -----------------------------------------------------------------
commit d5a8b9f1245d716d7bdc39216a8a9658b80b9e59
Author: sunnavy <sunnavy at bestpractical.com>
Date:   Tue Apr 10 01:37:31 2018 +0800

    Smaller action buttons to make them less obtrusive

diff --git a/html/Callbacks/RTIR/Elements/MakeClicky/Default b/html/Callbacks/RTIR/Elements/MakeClicky/Default
index 45e1f0a2..49264133 100644
--- a/html/Callbacks/RTIR/Elements/MakeClicky/Default
+++ b/html/Callbacks/RTIR/Elements/MakeClicky/Default
@@ -82,7 +82,7 @@ my %actions;
         # don't execute on non-rtir tickets or in SelfService
         return $super unless defined $args{type} and !$SelfService;
 
-        my $result = qq{<a class="button" href="}. RT::IR->HREFTo("Tools/Lookup.html?".$args{lookup_params}."type=host&q=".$escaped_host).qq{">}
+        my $result = qq{<a class="button compact" href="}. RT::IR->HREFTo("Tools/Lookup.html?".$args{lookup_params}."type=host&q=".$escaped_host).qq{">}
             .loc('lookup "[_1]"', $host) .qq{</a>};
         return $super . qq{ <span class="clickylink">$result</span>};
     },
@@ -96,7 +96,7 @@ my %actions;
         # don't execute on non-rtir tickets or in SelfService
         return $super unless defined $args{type} and !$SelfService;
 
-        my $result = qq{<a class="button" href="}. RT::IR->HREFTo("Tools/Lookup.html?".$args{lookup_params}."type=host&q=".$escaped_host).qq{">}
+        my $result = qq{<a class="button compact" href="}. RT::IR->HREFTo("Tools/Lookup.html?".$args{lookup_params}."type=host&q=".$escaped_host).qq{">}
             .loc('lookup "[_1]"', $host) .qq{</a>};
         return $super . qq{ <span class="clickylink">$result</span>};
     },
@@ -108,17 +108,17 @@ my %actions;
 
         $args{host} ||= $args{value};
         my $escaped_host = $escaper->($args{host});
-        my $result .= qq{<a class="button" href="}. RT::IR->HREFTo("Tools/Lookup.html?".$args{lookup_params}."type=ip&q=".$escaped_host).qq{">}
+        my $result .= qq{<a class="button compact" href="}. RT::IR->HREFTo("Tools/Lookup.html?".$args{lookup_params}."type=ip&q=".$escaped_host).qq{">}
                       .loc('Lookup IP') .q{</a>};
         if ( $args{incident} && !RT->Config->Get('RTIR_DisableCountermeasures') ) {
-            $result .= qq{<a class="button create_child_} . RT::IR->lifecycle_countermeasure . qq{" href="} .
+            $result .= qq{<a class="button compact create_child_} . RT::IR->lifecycle_countermeasure . qq{" href="} .
             RT::IR->HREFTo("CreateInQueue.html?Incident=".$args{incident}."&Lifecycle=".RT::IR->lifecycle_countermeasure.qq{&IP-Value=$escaped_host})
             .qq{">Block</a>};
         }
         if ( $args{'object'} && $args{'object'}->id ) {
             my $cf = RT::IR::GetCustomField('IP');
             my $tid = $args{'object'}->id;
-            $result .= qq{<a class="button" href="}.
+            $result .= qq{<a class="button compact" href="}.
             RT::IR->HREFTo("Edit.html?id=".$tid
                 .qq{&Object-RT::Ticket-$tid-CustomField-}. $cf->id .qq{-AddValue=$escaped_host}
                 .q{&SaveChanges=1})
@@ -154,14 +154,14 @@ my %actions;
         my $email = $args{'value'}; $email =~ s/^<|>$//g;
         my $escaped_email = $escaper->($email);
 
-        my $result = qq{<a class="button" href="}.
+        my $result = qq{<a class="button compact" href="}.
             RT::IR->HREFTo(qq{Tools/Lookup.html?$args{'lookup_params'}type=email&q=$escaped_email}). qq{">}
             .loc('lookup email') .q{</a>};
         if ( $args{'incident'} ) {
             if ( $r->uri =~ /Lookup.html$/ ) {
                 $result .= qq{<input type="checkbox" name="Requestorbox-$escaped_email" unchecked />};
             }
-            $result .= qq{<a class="button" href="}.
+            $result .= qq{<a class="button compact" href="}.
                 RT::IR->HREFTo( "CreateInQueue.html"
                 . qq{?Incident=$args{'incident'}}
                 . qq{&Lifecycle=}.RT::IR->lifecycle_investigation
@@ -171,7 +171,7 @@ my %actions;
         }
         my $domain = (split /@/, $email, 2)[1];
         my $escaped_domain = $escaper->($domain);
-        $result .= ' <a class="button" href="'. RT::IR->HREFTo(qq{Tools/Lookup.html?$args{'lookup_params'}type=host&q=$escaped_domain}). '">'
+        $result .= ' <a class="button compact" href="'. RT::IR->HREFTo(qq{Tools/Lookup.html?$args{'lookup_params'}type=host&q=$escaped_domain}). '">'
                .loc('lookup "[_1]"', $domain) .'</a>';
         return $escaper->($args{'value'}) . qq{ <span class="clickylink">$result</span>};
     },
@@ -182,7 +182,7 @@ my %actions;
         return $escaper->($args{value}) unless defined $args{type} and !$SelfService;
 
         $args{value} = $escaper->($args{value});
-        my $result = qq{<a class="button" href="}. RT::IR->HREFTo(qq{Tools/Lookup.html?$args{lookup_params}type=handle&q=$args{value}}).qq{">}
+        my $result = qq{<a class="button compact" href="}. RT::IR->HREFTo(qq{Tools/Lookup.html?$args{lookup_params}type=handle&q=$args{value}}).qq{">}
                .loc('lookup') .qq{</a>};
         return $args{value} . qq{ <span class="clickylink">$result</span>};
     },
@@ -193,7 +193,7 @@ my %actions;
         return $escaper->($args{value}) unless defined $args{type} and !$SelfService;
 
         $args{value} = $escaper->($args{value});
-        my $result = qq{<a class="button" href="}. RT::IR->HREFTo(qq{Tools/Lookup.html?$args{lookup_params}type=host&q=$args{value}}). qq{">}
+        my $result = qq{<a class="button compact" href="}. RT::IR->HREFTo(qq{Tools/Lookup.html?$args{lookup_params}type=host&q=$args{value}}). qq{">}
                .loc('lookup host') .qq{</a>};
         return $args{value} . qq{ <span class="clickylink">$result</span>};
     },
diff --git a/static/css/rtir-styles.css b/static/css/rtir-styles.css
index 98de11ea..da9f10c3 100644
--- a/static/css/rtir-styles.css
+++ b/static/css/rtir-styles.css
@@ -167,9 +167,7 @@ body.rtir .incidents .actions {
 
 body.rtir .incidents .actions .button {
     border: none;
-    padding: 0.95em;
-    padding-top: 0.2em;
-    padding-bottom: 0.2em;
+    padding: 0.2em 0.5em;
 }
 
 body.rtir .incidents .actions #create-incident {
@@ -200,3 +198,7 @@ body.rtir .sf-menu a.sf-with-ul {
 body.rtir table.lookup-tool-forms td {
     vertical-align: middle;
 }
+
+body.rtir .button.compact {
+    padding: 0.2em 0.5em;
+}

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


More information about the rt-commit mailing list