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

? sunnavy sunnavy at bestpractical.com
Tue Dec 31 08:21:52 EST 2013


The branch, 1.0/style has been created
        at  13b1404911e4e94b24da99cda66ecfd11acfc5ef (commit)

- Log -----------------------------------------------------------------
commit d43c8ae36a611cb1af98b1f89f14f61ffcb7b18e
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 8e6be66..a3829fc 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>
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 a56ae2a32db68571348e4e5242ac28914407e00a
Author: Jesse Vincent <jesse at bestpractical.com>
Date:   Mon Oct 7 16:01:29 2013 -0400

    Make the "create an asset" form contain 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 aa28eaf78d59a0a563d64b62729343fd17b692e3
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 6830407..f472430 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 9de016b63adc328ca53617fa1b230cfcbc259f05
Author: Jesse Vincent <jesse at bestpractical.com>
Date:   Mon Oct 7 16:03:11 2013 -0400

    wording change "but not" -> "not" for brevity

diff --git a/html/Asset/Elements/AssetSearchBasics b/html/Asset/Elements/AssetSearchBasics
index f472430..68f4f45 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"><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"><label for="!Description"><&|/l&>not</&></td>
     <td class="value"><input type="text" id="!Description" name="!Description" value="<% $ARGS{"!Description"} || ''%>" /></td></tr>
 % my $CFs = RT::CustomFields->new( $session{CurrentUser} );
 % $CFs->LimitToCatalog( $CatalogObj->Id );
@@ -75,7 +75,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"><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..8d660b6 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"><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/AssetSearchPeople b/html/Asset/Elements/AssetSearchPeople
index 90cb20c..cf568bd 100644
--- a/html/Asset/Elements/AssetSearchPeople
+++ b/html/Asset/Elements/AssetSearchPeople
@@ -54,7 +54,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"><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"} || '' %>" />
@@ -71,7 +71,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"><label for="!<% $name %>"><&|/l&>not</&></label></td>
   <td class="value"><& /Elements/SelectCustomFieldValue, CustomField => $cf, Name => "!$name", Default => $negval &></td>
 </tr>
 % }

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

    styling hook for 'not'

diff --git a/html/Asset/Elements/AssetSearchBasics b/html/Asset/Elements/AssetSearchBasics
index 68f4f45..02e1298 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&>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&>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>
 % my $CFs = RT::CustomFields->new( $session{CurrentUser} );
 % $CFs->LimitToCatalog( $CatalogObj->Id );
@@ -75,7 +75,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&>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 8d660b6..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&>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/AssetSearchPeople b/html/Asset/Elements/AssetSearchPeople
index cf568bd..347f033 100644
--- a/html/Asset/Elements/AssetSearchPeople
+++ b/html/Asset/Elements/AssetSearchPeople
@@ -54,7 +54,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&>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"} || '' %>" />
@@ -71,7 +71,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&>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 7f811fe0505098ed5edb76ed4e36560d5092d394
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..99e7c44 100644
--- a/html/Elements/RT__Asset/ColumnMap
+++ b/html/Elements/RT__Asset/ColumnMap
@@ -100,7 +100,7 @@ my $COLUMN_MAP = {
             my $Query = "RefersTo = 'asset:" . $Asset->id . "'";
             $Query .= " AND (" . join(" OR ", map { "Status = '$_'" } RT::Queue->ActiveStatusArray) . ")";
             my $SearchURL = RT->Config->Get('WebPath') . '/Search/Results.html?' . $m->comp('/Elements/QueryString', Query => $Query);
-            return \'[ <a href="',$SearchURL,\'">Active tickets</a> ]';
+            return \'[ <a href="',$SearchURL,\'">Active</a> ]';
         }
     },
     InactiveTickets => {
@@ -110,7 +110,7 @@ my $COLUMN_MAP = {
             my $Query = "RefersTo = 'asset:" . $Asset->id . "'";
             $Query .= " AND (" . join(" OR ", map { "Status = '$_'" } RT::Queue->InactiveStatusArray) . ")";
             my $SearchURL = RT->Config->Get('WebPath') . '/Search/Results.html?' . $m->comp('/Elements/QueryString', Query => $Query);
-            return \'[ <a href="',$SearchURL,\'">Inactive tickets</a> ]';
+            return \'[ <a href="',$SearchURL,\'">Inactive</a> ]';
         }
     },
 };

commit 7a0a4573479e83c6f6215eb4e32367851720ca21
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 f17d305..fa3a101 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 13b1404911e4e94b24da99cda66ecfd11acfc5ef
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 fa3a101..07f040e 100644
--- a/static/css/RTx-Assets.css
+++ b/static/css/RTx-Assets.css
@@ -89,3 +89,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