[Bps-public-commit] rt-extension-assets branch, 1.0/style, created. 54b3a402e74afe480923a67c1d3d7c4a346f96ff

Jesse Vincent jesse at bestpractical.com
Mon Oct 7 16:18:45 EDT 2013


The branch, 1.0/style has been created
        at  54b3a402e74afe480923a67c1d3d7c4a346f96ff (commit)

- Log -----------------------------------------------------------------
commit b0852b3334dcc8a675e8aa7cb2541f0ef2ccb64e
Author: Jesse Vincent <jesse at bestpractical.com>
Date:   Mon Oct 7 16:00:56 2013 -0400

    Cut some input sizes down so they will actually fit inside a reflowed layout

diff --git a/html/Admin/Assets/Catalogs/Elements/EditBasics b/html/Admin/Assets/Catalogs/Elements/EditBasics
index 48f6f4b..fbeef81 100644
--- a/html/Admin/Assets/Catalogs/Elements/EditBasics
+++ b/html/Admin/Assets/Catalogs/Elements/EditBasics
@@ -48,11 +48,11 @@
 <table>
   <tr>
     <td class="label"><label for="Name"><&|/l&>Name</&></label></td>
-    <td><input name="Name" value="<% $current{Name} %>" size="50"></td>
+    <td><input name="Name" value="<% $current{Name} %>" size="40"></td>
   </tr>
   <tr>
     <td class="label"><label for="Description"><&|/l&>Description</&></label></td>
-    <td><input name="Description" value="<% $current{Description} %>" size="75"></td>
+    <td><input name="Description" value="<% $current{Description} %>" size="40"></td>
   </tr>
   <tr class="lifecycle">
     <td class="label"><label for="Lifecycle"><&|/l&>Lifecycle</&></label></td>
diff --git a/html/Asset/Elements/EditBasics b/html/Asset/Elements/EditBasics
index 409eb37..ae6c01a 100644
--- a/html/Asset/Elements/EditBasics
+++ b/html/Asset/Elements/EditBasics
@@ -54,11 +54,11 @@
 % }
   <tr class="asset-name">
     <td class="label"><label for="Name"><&|/l&>Name</&></label></td>
-    <td><input name="Name" value="<% $current{Name} %>" size="50"></td>
+    <td><input name="Name" value="<% $current{Name} %>" size="40"></td>
   </tr>
   <tr class="asset-description">
     <td class="label"><label for="Description"><&|/l&>Description</&></label></td>
-    <td><input name="Description" value="<% $current{Description} %>" size="75"></td>
+    <td><input name="Description" value="<% $current{Description} %>" size="40"></td>
   </tr>
   <tr class="asset-status">
     <td class="label"><label for="Status"><&|/l&>Status</&></label></td>

commit e14c10304c6a696b499b512ee0ef1978c3e3952c
Author: Jesse Vincent <jesse at bestpractical.com>
Date:   Mon Oct 7 16:01:29 2013 -0400

    Make the "create an asset" form contane a table for semi-reliable twocol
    layout.

diff --git a/html/Asset/Create.html b/html/Asset/Create.html
index 308af0e..0481c5d 100644
--- a/html/Asset/Create.html
+++ b/html/Asset/Create.html
@@ -55,14 +55,16 @@
 <& /Elements/Tabs &>
 
 <& /Elements/ListActions, actions => \@results &>
-
 <form method="post" enctype="multipart/form-data" id="CreateAsset" action="Create.html">
   <input type="hidden" name="id" value="new">
   <input type="hidden" name="Catalog" value="<% $catalog->id %>">
 
-<div id="Asset-Create-basics">
 <a name="basics"></a>
-
+<div id="Asset-Create-basics" class="asset-metadata">
+    <table>
+        <tbody>
+        <tr>
+            <td>
   <&| /Widgets/TitleBox, title => loc("Basics"), class => "asset-basics", title_class => "inverse" &>
     <& Elements/EditBasics, %ARGS, AssetObj => $asset, CatalogObj => $catalog &>
   </&>
@@ -70,16 +72,21 @@
   <&| /Widgets/TitleBox, title => loc("People"), class => "asset-people", title_class => "inverse" &>
     <& Elements/EditPeople, %ARGS, AssetObj => $asset &>
   </&>
-
-</div>
-
-<div id="Asset-Create-details">
-<a name="details"></a>
+  </td><td>
   <&| /Widgets/TitleBox, title => loc("Links"), class => "asset-links", title_class => "inverse" &>
     <& /Elements/AddLinks,
         Object          => $asset,
         CustomFields    => $catalog->AssetCustomFields &>
   </&>
+  </td>
+
+  </tr>
+  </tbody>
+  </table>
+</div>
+
+<div id="Asset-Create-details">
+<a name="details"></a>
 
   <& /Elements/EditCustomFieldCustomGroupings,
         Object => $asset,

commit 4c7f149bbdb7c32feb0ee422b9a7c8285aac42f3
Author: Jesse Vincent <jesse at bestpractical.com>
Date:   Mon Oct 7 16:02:25 2013 -0400

    add some more html so we can style it

diff --git a/html/Asset/Elements/AssetSearchBasics b/html/Asset/Elements/AssetSearchBasics
index f4ebe67..9d77a83 100644
--- a/html/Asset/Elements/AssetSearchBasics
+++ b/html/Asset/Elements/AssetSearchBasics
@@ -45,7 +45,7 @@
 %# those contributions and any derivatives thereof.
 %#
 %# END BPS TAGGED BLOCK }}}
-<&| /Widgets/TitleBox, title => 'Basics' &>
+<&| /Widgets/TitleBox, title => 'Basics', class=>'asset-search-grouping asset-search-basics' &>
 <table>
 <tr class="asset-catalog"><td class="label"><label for="Catalog"><&|/l&>Catalog</&></label></td>
     <td class="value" colspan="3">
diff --git a/html/Asset/Elements/AssetSearchCFs b/html/Asset/Elements/AssetSearchCFs
index 8211f9d..a83c9ba 100644
--- a/html/Asset/Elements/AssetSearchCFs
+++ b/html/Asset/Elements/AssetSearchCFs
@@ -45,7 +45,7 @@
 %# those contributions and any derivatives thereof.
 %#
 %# END BPS TAGGED BLOCK }}}
-<&| /Widgets/TitleBox, title => $Grouping ? loc($Grouping) : loc('Custom Fields'), hide_empty => 1 &>
+<&| /Widgets/TitleBox, title => $Grouping ? loc($Grouping) : loc('Custom Fields'), hide_empty => 1, class=>'asset-search-grouping asset-search-cfs'  &>
 % my $CFs = RT::CustomFields->new( $session{CurrentUser} );
 % $CFs->LimitToCatalog( $CatalogObj->Id );
 % $CFs->LimitToGrouping( "RT::Asset" => $Grouping );
diff --git a/html/Asset/Elements/ShowSummary b/html/Asset/Elements/ShowSummary
index 34ef997..8b77bf0 100644
--- a/html/Asset/Elements/ShowSummary
+++ b/html/Asset/Elements/ShowSummary
@@ -65,6 +65,7 @@ for my $section (@sections) {
         . $AssetObj->id;
 }
 </%init>
+<div class="asset-metadata">
 % for my $section (@sections) {
 <&| /Widgets/TitleBox, title => loc($section), title_href => $link{$section}, title_class => "inverse", class => "asset-\L$section" &>
     <& "Show$section", AssetObj => $AssetObj &>
@@ -76,3 +77,4 @@ for my $section (@sections) {
      title_href => RT->Config->Get("WebPath") . "/Asset/ModifyCFs.html",
      TitleBoxARGS => { title_class => "inverse" },
  &>
+</div>

commit 76f892800298687a8af8e14b2ba7ee1401b1853e
Author: Jesse Vincent <jesse at bestpractical.com>
Date:   Mon Oct 7 16:03:11 2013 -0400

    wording chang "but not" -> "not" for brevity
    styling hook for 'not'

diff --git a/html/Asset/Elements/AssetSearchBasics b/html/Asset/Elements/AssetSearchBasics
index 9d77a83..173aeb8 100644
--- a/html/Asset/Elements/AssetSearchBasics
+++ b/html/Asset/Elements/AssetSearchBasics
@@ -59,11 +59,11 @@
 </td></tr>
 <tr class="asset-name"><td class="label"><label for="Name"><&|/l&>Name</&></label></td>
     <td class="value"><input type="text" id="Name" name="Name" value="<% $ARGS{Name} || ''%>" /></td>
-    <td class="label"><label for="!Name"><&|/l&>but not</&></td>
+    <td class="label not"><label for="!Name"><&|/l&>not</&></td>
     <td class="value"><input type="text" id="!Name" name="!Name" value="<% $ARGS{"!Name"} || ''%>" /></td></tr>
 <tr class="asset-description"><td class="label"><label for="Description"><&|/l&>Description</&></label></td>
     <td class="value"><input type="text" id="Description" name="Description" value="<% $ARGS{Description} || ''%>" /></td>
-    <td class="label"><label for="!Description"><&|/l&>but not</&></td>
+    <td class="label not "><label for="!Description"><&|/l&>not</&></td>
     <td class="value"><input type="text" id="!Description" name="!Description" value="<% $ARGS{"!Description"} || ''%>" /></td></tr>
 % for my $role (RT::Asset->Roles) {
 <tr class="asset-role-<% CSSClass($role) %>">
@@ -72,7 +72,7 @@
       <input type="text" id="Role.<% $role %>" name="Role.<% $role %>"
              data-autocomplete="Users" value="<% $ARGS{"Role.$role"} || '' %>" />
   </td>
-  <td class="label"><label for="!Role.<% $role %>"><&|/l&>but not</&></td>
+  <td class="label not"><label for="!Role.<% $role %>"><&|/l&>not</&></td>
   <td class="value">
       <input type="text" id="!Role.<% $role %>" name="!Role.<% $role %>"
              data-autocomplete="Users" value="<% $ARGS{"!Role.$role"} || '' %>" />
@@ -89,7 +89,7 @@
 <tr>
   <td class="label"><label for="<% $name %>"><% $cf->Name %></label></td>
   <td class="value"><& /Elements/SelectCustomFieldValue, CustomField => $cf, Name => $name, Default => $value &></td>
-  <td class="label"><label for="!<% $name %>"><&|/l&>but not</&></label></td>
+  <td class="label not"><label for="!<% $name %>"><&|/l&>not</&></label></td>
   <td class="value"><& /Elements/SelectCustomFieldValue, CustomField => $cf, Name => "!$name", Default => $negval &></td>
 </tr>
 % }
diff --git a/html/Asset/Elements/AssetSearchCFs b/html/Asset/Elements/AssetSearchCFs
index a83c9ba..ad52e3b 100644
--- a/html/Asset/Elements/AssetSearchCFs
+++ b/html/Asset/Elements/AssetSearchCFs
@@ -58,7 +58,7 @@
 <tr>
   <td class="label"><label for="<% $name %>"><% $cf->Name %></label></td>
   <td class="value"><& /Elements/SelectCustomFieldValue, CustomField => $cf, Name => $name, Default => $value &></td>
-  <td class="label"><label for="!<% $name %>"><&|/l&>but not</&></label></td>
+  <td class="label not"><label for="!<% $name %>"><&|/l&>not</&></label></td>
   <td class="value"><& /Elements/SelectCustomFieldValue, CustomField => $cf, Name => "!$name", Default => $negval &></td>
 </tr>
 %   }

commit 9bfcdc1a24a1618e243afdab0d9f64ffdb0780c9
Author: Jesse Vincent <jesse at bestpractical.com>
Date:   Mon Oct 7 16:03:39 2013 -0400

    move a submit out of a titlebox since it was messing up wrapping

diff --git a/html/Asset/Elements/AssetSearchBasics b/html/Asset/Elements/AssetSearchBasics
index 173aeb8..2687b23 100644
--- a/html/Asset/Elements/AssetSearchBasics
+++ b/html/Asset/Elements/AssetSearchBasics
@@ -94,8 +94,8 @@
 </tr>
 % }
 </table>
-<& /Elements/Submit, Label => loc('Search'), Name => 'SearchAssets' &>
 </&>
+<& /Elements/Submit, Label => loc('Search'), Name => 'SearchAssets' &>
 <%args>
 $CatalogObj => undef
 </%args>

commit a77ec18cd17523134aca3b98c82b1bb8d2e89eac
Author: Jesse Vincent <jesse at bestpractical.com>
Date:   Mon Oct 7 16:03:59 2013 -0400

    More shorter inputs for styling

diff --git a/html/Asset/Search/Bulk.html b/html/Asset/Search/Bulk.html
index ee6d626..7beef09 100644
--- a/html/Asset/Search/Bulk.html
+++ b/html/Asset/Search/Bulk.html
@@ -81,11 +81,11 @@
   </tr>
   <tr class="asset-name">
     <td class="label"><label for="UpdateName"><&|/l&>Name</&></label></td>
-    <td><input name="UpdateName" value="<% $ARGS{'Name'}||'' %>" size="50"></td>
+    <td><input name="UpdateName" value="<% $ARGS{'Name'}||'' %>" size="40"></td>
   </tr>
   <tr class="asset-description">
     <td class="label"><label for="UpdateDescription"><&|/l&>Description</&></label></td>
-    <td><input name="UpdateDescription" value="<% $ARGS{'Description'}||'' %>" size="75"></td>
+    <td><input name="UpdateDescription" value="<% $ARGS{'Description'}||'' %>" size="40"></td>
   </tr>
   <tr class="asset-status">
     <td class="label"><label for="UpdateStatus"><&|/l&>Status</&></label></td>

commit c0deb4d05ea7c59ac06337f7d491f7d7c4b5d411
Author: Jesse Vincent <jesse at bestpractical.com>
Date:   Mon Oct 7 16:04:17 2013 -0400

    Brevity. In a column labeled 'tickets', don't repeat the words "tickets" twice
    per line

diff --git a/html/Elements/RT__Asset/ColumnMap b/html/Elements/RT__Asset/ColumnMap
index b183c5c..04e2e14 100644
--- a/html/Elements/RT__Asset/ColumnMap
+++ b/html/Elements/RT__Asset/ColumnMap
@@ -94,7 +94,7 @@ my $COLUMN_MAP = {
         value     => sub { loc($_[0]->Status) }
     },
     ActiveTickets => {
-        title     => 'Active tickets', # loc
+        title     => 'Active', # loc
         value     => sub {
             my $Asset = shift;
             my $Query = "RefersTo = 'asset:" . $Asset->id . "'";
@@ -104,7 +104,7 @@ my $COLUMN_MAP = {
         }
     },
     InactiveTickets => {
-        title     => 'Inactive tickets', # loc
+        title     => 'Inactive', # loc
         value     => sub {
             my $Asset = shift;
             my $Query = "RefersTo = 'asset:" . $Asset->id . "'";

commit e1cb0425aaff4f01f4694170ed357f1265425e4e
Author: Jesse Vincent <jesse at bestpractical.com>
Date:   Mon Oct 7 16:05:17 2013 -0400

    This change would want to move into RT if it's accepted. it makes our search
    results not wrap funny

diff --git a/static/css/RTx-Assets.css b/static/css/RTx-Assets.css
index e33bc7c..4b27e37 100644
--- a/static/css/RTx-Assets.css
+++ b/static/css/RTx-Assets.css
@@ -15,6 +15,10 @@
     text-align: right;
 }
 
+.collection-as-table td {
+    white-space:nowrap;
+}
+
 /* Colors */
 
 .asset-basics   .titlebox .titlebox-title .left,

commit 54b3a402e74afe480923a67c1d3d7c4a346f96ff
Author: Jesse Vincent <jesse at bestpractical.com>
Date:   Mon Oct 7 16:18:37 2013 -0400

    First pass at comprehensive styling for assets

diff --git a/static/css/RTx-Assets.css b/static/css/RTx-Assets.css
index 4b27e37..91b2837 100644
--- a/static/css/RTx-Assets.css
+++ b/static/css/RTx-Assets.css
@@ -1,3 +1,5 @@
+
+
 #assets-accordion h3 {
     position: relative;
 }
@@ -28,6 +30,9 @@
 .asset-links    .titlebox .titlebox-title .left { background-color: #316531; }
 .ticket-assets  .titlebox .titlebox-title .left { background-color: #316531; }
 
+
+
+
 /* People display */
 #comp-Asset-Display .asset-people table {
     width: 100%;
@@ -86,3 +91,105 @@
     font-weight: bold;
     color: black;
 }
+.asset-metadata>div {
+    vertical-align: top;
+    min-width: 30%;
+    max-width: 30%;
+    padding-right: 1.5em;
+    display: inline-block;
+}
+
+.asset-metadata {
+    padding-top: 2em; /* nav overflows this :< */
+}
+
+/* on a little screen, let's just use a single column */
+ at media(max-width: 600px) {
+	.asset-metadata {
+	    padding-top: 6em; /* nav overflows this :< */
+	}
+	.asset-metadata>div {
+	    min-width: 100%;
+	    width: 100%;
+	}
+	
+	#Asset-Create-basics>table,  
+	#Asset-Create-basics>table>tbody>tr ,
+	#Asset-Create-basics>table>tbody>tr>td  {
+	    display: block;
+	}
+	
+}
+
+/* On a reasonable-width screen, make better use of whitespace */
+ at media(min-width: 601px) {
+	.edit-custom-fields tr, 
+    #ModifyAsset .asset-basics tr {
+	    display: inline-block;
+	    width: 50%;
+	
+	}
+	.edit-custom-fields tr td.cflabel, 
+    #ModifyAsset .asset-basics tr td.label,  
+    #ModifyAsset .asset-basics tr td.cflabel {
+	    width: 13em;
+	}
+	
+	
+	/* Asset creation */
+	
+	#Asset-Create-basics>table  {
+	    width: 100%;
+	    align: left;
+	}
+	#Asset-Create-basics>table>tbody>tr>td {
+	    padding-right: 2em;
+	}
+	#Asset-Create-basics>table>tbody>tr{
+	        vertical-align: top;
+	}
+	
+	
+}
+
+/* basic cleanups for the search UI's elements */
+
+.asset-search-grouping input.datepicker {
+    width: 7em;
+}
+ .asset-search-grouping td *{
+    max-width: 11em;
+ }
+.asset-search-grouping td.label.not {
+    min-width: 3em;
+    width: auto;
+    padding-left: 1em;
+}
+
+/* On a wide screen, use two columns for search criteria */
+ at media (min-width:1150px){
+	.asset-search-grouping.asset-search-cfs {
+	
+	    display: inline-block;
+	    width: 45%;
+	    padding-right: 1em;
+	    vertical-align: top;
+	}
+	.titlebox.asset-search-grouping.asset-search-cfs {
+	    display: block;
+	    width: auto;
+	    padding: inherit;
+	}
+	
+	
+	.asset-search-basics tr {
+	    width: 49%;
+	    display:inline-block;
+	    white-space: nowrap;
+	}
+	.asset-search-basics tr>td {
+	    display:inline-block;
+	    width:10em;
+	}
+	
+}

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



More information about the Bps-public-commit mailing list