Revision: 8117
Author: gwt.mirror...@gmail.com
Date: Wed May 12 17:53:06 2010
Log: Updates the Scaffoling sample UI. Also updates the behavior of the sample to display the first entity when the app is loaded.

http://code.google.com/p/google-web-toolkit/source/detail?r=8117

Modified:
/branches/2.1/bikeshed/src/com/google/gwt/app/client/CellListPlacePickerView.java /branches/2.1/bikeshed/src/com/google/gwt/sample/expenses/gwt/client/ScaffoldShell.ui.xml /branches/2.1/bikeshed/src/com/google/gwt/sample/expenses/gwt/ui/employee/EmployeeDetailsView.ui.xml /branches/2.1/bikeshed/src/com/google/gwt/sample/expenses/gwt/ui/employee/EmployeeEditView.ui.xml /branches/2.1/bikeshed/src/com/google/gwt/sample/expenses/gwt/ui/employee/EmployeeListView.ui.xml /branches/2.1/bikeshed/src/com/google/gwt/sample/expenses/gwt/ui/report/ReportDetailsView.ui.xml /branches/2.1/bikeshed/src/com/google/gwt/sample/expenses/gwt/ui/report/ReportEditView.ui.xml /branches/2.1/bikeshed/src/com/google/gwt/sample/expenses/gwt/ui/report/ReportListView.ui.xml
 /branches/2.1/bikeshed/war/Scaffold.html

=======================================
--- /branches/2.1/bikeshed/src/com/google/gwt/app/client/CellListPlacePickerView.java Tue May 11 09:34:32 2010 +++ /branches/2.1/bikeshed/src/com/google/gwt/app/client/CellListPlacePickerView.java Wed May 12 17:53:06 2010
@@ -83,5 +83,6 @@
     // Replace the current renderer.
     this.renderer = renderer;
     cellList.setData(0, places.size(), places);
+    smodel.setSelected(places.get(0), true);
   }
 }
=======================================
--- /branches/2.1/bikeshed/src/com/google/gwt/sample/expenses/gwt/client/ScaffoldShell.ui.xml Tue May 11 09:04:15 2010 +++ /branches/2.1/bikeshed/src/com/google/gwt/sample/expenses/gwt/client/ScaffoldShell.ui.xml Wed May 12 17:53:06 2010
@@ -4,48 +4,48 @@
   xmlns:a='urn:import:com.google.gwt.app.client'>

   <ui:style>
-    @def contentWidth 800px;
+    @def contentWidth 850px;

     .disabled {
-     color: gray;
-    }
-
+      color: gray;
+    }
+
     .body {
-       overflow:auto;
-     }
+      overflow:auto;
+    }

     .banner {
-       background-color: #777;
-       -moz-border-radius-topleft: 10px;
-       -webkit-border-top-left-radius: 10px;
-       -moz-border-radius-topright: 10px;
-       -webkit-border-top-right-radius: 10px;
-       margin-top: 1.5em;
-       height: 4em;
-     }
+      background-color: #777;
+      -moz-border-radius-topleft: 10px;
+      -webkit-border-top-left-radius: 10px;
+      -moz-border-radius-topright: 10px;
+      -webkit-border-top-right-radius: 10px;
+      margin-top: 1.5em;
+      height: 4em;
+    }

     .title {
-       color: white;
-       padding: 1em;
-       position: absolute;
-       color: #def;
-     }
-
-     .title h2 {
-       margin:0;
-     }
+      color: white;
+      padding: 1em;
+      position: absolute;
+      color: #def;
+    }
+
+    .title h2 {
+      margin:0;
+    }

     .error {
-       position: absolute;
-       left: 12%;
-       right: 12%;
-       text-align: center;
-       background-color: red;
+      position: absolute;
+      left: 12%;
+      right: 12%;
+      text-align: center;
+      background-color: red;
     }

     .users {
-     position: absolute;
-     right: 0;
+      position: absolute;
+      right: 0;
     }

     .centered {
@@ -56,7 +56,7 @@

     .content {
       position: relative;
-      border: 1px solid #888;
+      border: 1px solid #ddf;
       overflow-y: auto;
       overflow-x: hidden;
       -moz-border-radius-bottomleft: 10px;
@@ -74,7 +74,7 @@
      }

      .entitiesList {
-       border-right: 1px solid #888;
+       border-right: 1px solid #ddf;
        height: 100%;
        outline: none;
      }
@@ -86,7 +86,7 @@
      }

      .entityDetails {
-       margin-left: 12em;
+       margin-left: 11em;
      }
   </ui:style>

@@ -95,21 +95,17 @@
       <g:HTML styleName='{style.centered}'>
         <div class='{style.banner}'>
           <div class='{style.error}' ui:field='error'></div>
-          <span class='{style.title}'><h2>Your Entities</h2></span>
+          <span class='{style.title}'><h2>Data Browser</h2></span>
         </div>
       </g:HTML>
     </g:north>
-    <g:south size='4'><g:HTML></g:HTML></g:south>
+    <g:south size='2'><g:HTML></g:HTML></g:south>
     <g:center>
       <g:FlowPanel styleName='{style.content} {style.centered}'>
         <g:SimplePanel styleName='{style.entities}'>
<a:CellListPlacePickerView styleName="{style.entitiesList}" width='100%' pageSize='100' ui:field='placesBox'/>
         </g:SimplePanel>
         <g:SimplePanel styleName="{style.entityDetails}" ui:field='master'>
-          <g:HTML>
-            <h3>Welcome to the Entity Browser</h3>
- <span>Choose an entity set from the list on the left to get started</span>
-          </g:HTML>
         </g:SimplePanel>
<g:SimplePanel styleName="{style.entityDetails}" ui:field='details'>
         </g:SimplePanel>
=======================================
--- /branches/2.1/bikeshed/src/com/google/gwt/sample/expenses/gwt/ui/employee/EmployeeDetailsView.ui.xml Tue May 11 09:04:15 2010 +++ /branches/2.1/bikeshed/src/com/google/gwt/sample/expenses/gwt/ui/employee/EmployeeDetailsView.ui.xml Wed May 12 17:53:06 2010
@@ -3,44 +3,45 @@
   xmlns:g='urn:import:com.google.gwt.user.client.ui'>
   <ui:style>
     .fields {
-       margin: 0.5em;
-     }
-
-    .fields div {
-       margin: 0.5em;
-     }
-
+      margin-top: 0.5em;
+      margin-left: 1em;
+    }
     .label {
-      font-weight:bold;
-     }
-
+      font-weight: bold;
+      min-height: 25px;
+    }
     .button {
       margin-right: 1em;
-     }
-
+    }
     .bar {
-      margin-left: 0.5em;
-     }
-     .header {
-       border-bottom: 2px solid #6F7277;
-       color: #4B4A4A;
-       text-shadow: #ddf 1px 1px 0;
-     }
+      margin-left: 1em;
+    }
+    .header {
+      margin-left: 1em;
+      color: #4B4A4A;
+      text-shadow: #ddf 1px 1px 0;
+      margin-bottom: 0;
+    }
+    .underline {
+      border-bottom: 2px solid #6F7277;
+    }
   </ui:style>

   <g:HTMLPanel>
- <h3 class='{style.header}'><ui:msg>Employee <span ui:field='idSpan' /> (v<span ui:field='versionSpan'/>)</ui:msg></h3>
-
-  <table class='{style.fields}'>
- <tr><td><span class='{style.label}'>Display Name:</span></td><td><span ui:field='displayName'></span></td></tr> - <tr><td><span class='{style.label}'>User Name:</span></td><td><span ui:field='userName'></span></td></tr> - <tr><td><span class='{style.label}'>Supervisor Key:</span></td><td><span ui:field='supervisorKey'></span></td></tr> - <tr><td><span class='{style.label}'>Password:</span></td><td><span ui:field='password'></span></td></tr>
-  </table>
-
-  <div class='{style.bar}'>
-  <g:Button addStyleNames='{style.button}' ui:field='edit'>Edit</g:Button>
-  <g:Anchor ui:field='delete'>Delete</g:Anchor>
-  </div>
+    <div class='{style.underline}'>
+ <h3 class='{style.header}'><ui:msg>Employee <span ui:field='idSpan' /> (v<span ui:field='versionSpan'/>)</ui:msg></h3>
+    </div>
+
+    <table class='{style.fields}'>
+ <tr><td><div class='{style.label}'>Display Name:</div></td><td><span ui:field='displayName'></span></td></tr> + <tr><td><div class='{style.label}'>User Name:</div></td><td><span ui:field='userName'></span></td></tr> + <tr><td><div class='{style.label}'>Supervisor Key:</div></td><td><span ui:field='supervisorKey'></span></td></tr> + <tr><td><div class='{style.label}'>Password:</div></td><td><span ui:field='password'></span></td></tr>
+   </table>
+
+    <div class='{style.bar}'>
+ <g:Button addStyleNames='{style.button}' ui:field='edit'>Edit</g:Button>
+      <g:Anchor ui:field='delete'>Delete</g:Anchor>
+    </div>
   </g:HTMLPanel>
 </ui:UiBinder>
=======================================
--- /branches/2.1/bikeshed/src/com/google/gwt/sample/expenses/gwt/ui/employee/EmployeeEditView.ui.xml Tue May 11 09:04:15 2010 +++ /branches/2.1/bikeshed/src/com/google/gwt/sample/expenses/gwt/ui/employee/EmployeeEditView.ui.xml Wed May 12 17:53:06 2010
@@ -3,43 +3,44 @@
   xmlns:g='urn:import:com.google.gwt.user.client.ui' >
   <ui:style>
     .fields {
-       margin: 0.5em;
-     }
-
-    .fields div {
-       margin: 0.5em;
-     }
-
+      margin-top: 0.5em;
+      margin-left: 1em;
+    }
     .label {
-      font-weight:bold;
-     }
-
+      font-weight: bold;
+      min-height: 25px;
+    }
     .button {
       margin-right: 1em;
-     }
-
+    }
     .bar {
-      margin-left: 0.5em;
-     }
-     .header {
-       border-bottom: 2px solid #6F7277;
-       color: #4B4A4A;
-       text-shadow: #ddf 1px 1px 0;
-     }
+      margin-left: 1em;
+    }
+    .header {
+      margin-left: 1em;
+      color: #4B4A4A;
+      text-shadow: #ddf 1px 1px 0;
+      margin-bottom: 0;
+    }
+    .underline {
+      border-bottom: 2px solid #6F7277;
+    }
   </ui:style>

   <g:HTMLPanel>
-    <h3 class='{style.header}' ui:field='editTitle'>
- <ui:msg>Employee <g:InlineLabel ui:field='id'></g:InlineLabel> (v<g:InlineLabel ui:field='version'/>)</ui:msg>
-    </h3>
- <h3 class='{style.header}' ui:field='createTitle'><ui:msg>New Employee</ui:msg></h3>
-    <div ui:field='errors' style='background-color: red; '></div>
+    <div class='{style.underline}'>
+      <h3 class='{style.header}' ui:field='editTitle'>
+ <ui:msg>Employee <g:InlineLabel ui:field='id'></g:InlineLabel> (v<g:InlineLabel ui:field='version'/>)</ui:msg>
+      </h3>
+ <h3 class='{style.header}' ui:field='createTitle'><ui:msg>New Employee</ui:msg></h3>
+    </div>
+    <div ui:field='errors' style='background-color: red;'></div>

     <table class='{style.fields}'>
- <tr><td><span class='{style.label}'>Display Name:</span></td><td><g:TextBox ui:field='displayName'></g:TextBox></td></tr> - <tr><td><span class='{style.label}'>User Name:</span></td><td><g:TextBox ui:field='userName'></g:TextBox></td></tr> - <tr><td><span class='{style.label}'>Supervisor Key:</span></td><td><g:TextBox ui:field='supervisorKey'></g:TextBox></td></tr> - <tr><td><span class='{style.label}'>Password:</span></td><td><g:PasswordTextBox ui:field='password'></g:PasswordTextBox></td></tr> + <tr><td><div class='{style.label}'>Display Name:</div></td><td><g:TextBox ui:field='displayName'></g:TextBox></td></tr> + <tr><td><div class='{style.label}'>User Name:</div></td><td><g:TextBox ui:field='userName'></g:TextBox></td></tr> + <tr><td><div class='{style.label}'>Supervisor Key:</div></td><td><g:TextBox ui:field='supervisorKey'></g:TextBox></td></tr> + <tr><td><div class='{style.label}'>Password:</div></td><td><g:PasswordTextBox ui:field='password'></g:PasswordTextBox></td></tr>
     </table>

     <div class='{style.bar}'>
=======================================
--- /branches/2.1/bikeshed/src/com/google/gwt/sample/expenses/gwt/ui/employee/EmployeeListView.ui.xml Tue May 11 09:04:15 2010 +++ /branches/2.1/bikeshed/src/com/google/gwt/sample/expenses/gwt/ui/employee/EmployeeListView.ui.xml Wed May 12 14:48:39 2010
@@ -30,9 +30,14 @@
     .controls button {
        display:inline;
      }
-     .listView table {
+     .listView > table {
        table-layout:fixed;
-       word-wrap: break-word;
+     }
+     .listView > table td {
+       text-overflow: ellipsis;
+       overflow: hidden;
+       white-space: nowrap;
+       cursor: pointer;
      }
   </ui:style>

=======================================
--- /branches/2.1/bikeshed/src/com/google/gwt/sample/expenses/gwt/ui/report/ReportDetailsView.ui.xml Tue May 11 09:04:15 2010 +++ /branches/2.1/bikeshed/src/com/google/gwt/sample/expenses/gwt/ui/report/ReportDetailsView.ui.xml Wed May 12 14:48:39 2010
@@ -3,40 +3,41 @@
   xmlns:g='urn:import:com.google.gwt.user.client.ui'>
   <ui:style>
     .fields {
-       margin: 0.5em;
-     }
-
-    .fields div {
-       margin: 0.5em;
-     }
-
+      margin-top: 0.5em;
+      margin-left: 1em;
+    }
     .label {
-      font-weight:bold;
-     }
-
+      font-weight: bold;
+      min-height: 25px;
+    }
     .button {
       margin-right: 1em;
-     }
-
+    }
     .bar {
-      margin-left: 0.5em;
-     }
-     .header {
-       border-bottom: 2px solid #6F7277;
-       color: #4B4A4A;
-       text-shadow: #ddf 1px 1px 0;
-     }
+      margin-left: 1em;
+    }
+    .header {
+      margin-left: 1em;
+      color: #4B4A4A;
+      text-shadow: #ddf 1px 1px 0;
+      margin-bottom: 0;
+    }
+    .underline {
+      border-bottom: 2px solid #6F7277;
+    }
   </ui:style>

   <g:HTMLPanel>
- <h3 class='{style.header}'><ui:msg>Report <span ui:field='idSpan' /> (v<span ui:field='versionSpan'/>)</ui:msg></h3>
-
-   <table class='{style.fields}'>
- <tr><td><span class='{style.label}'>Purpose:</span></td><td><span ui:field='purpose'></span></td></tr> - <tr><td><span class='{style.label}'>Notes:</span></td><td><span ui:field='notes'></span></td></tr> - <tr><td><span class='{style.label}'>Created:</span></td><td><span ui:field='created'></span></td></tr> - <tr><td><span class='{style.label}'>Reporter Key:</span></td><td><span ui:field='reporterKey'></span></td></tr> - <tr><td><span class='{style.label}'>Approved Supervisor Key:</span></td><td><span ui:field='approvedSupervisorKey'></span></td></tr>
+    <div class='{style.underline}'>
+ <h3 class='{style.header}'><ui:msg>Report <span ui:field='idSpan' /> (v<span ui:field='versionSpan'/>)</ui:msg></h3>
+    </div>
+
+    <table class='{style.fields}'>
+ <tr><td><div class='{style.label}'>Purpose:</div></td><td><span ui:field='purpose'></span></td></tr> + <tr><td><div class='{style.label}'>Notes:</div></td><td><span ui:field='notes'></span></td></tr> + <tr><td><div class='{style.label}'>Created:</div></td><td><span ui:field='created'></span></td></tr> + <tr><td><div class='{style.label}'>Reporter Key:</div></td><td><span ui:field='reporterKey'></span></td></tr> + <tr><td><div class='{style.label}'>Approved Supervisor Key:</div></td><td><span ui:field='approvedSupervisorKey'></span></td></tr>
     </table>

     <div class='{style.bar}'>
=======================================
--- /branches/2.1/bikeshed/src/com/google/gwt/sample/expenses/gwt/ui/report/ReportEditView.ui.xml Tue May 11 09:04:15 2010 +++ /branches/2.1/bikeshed/src/com/google/gwt/sample/expenses/gwt/ui/report/ReportEditView.ui.xml Wed May 12 14:48:39 2010
@@ -4,48 +4,50 @@
   xmlns:d='urn:import:com.google.gwt.user.datepicker.client' >
   <ui:style>
     .fields {
-       margin: 0.5em;
-     }
-
-    .fields div {
-       margin: 0.5em;
-     }
-
+      margin-top: 0.5em;
+      margin-left: 1em;
+    }
     .label {
-      font-weight:bold;
-     }
-
+      font-weight: bold;
+      min-height: 25px;
+    }
     .button {
       margin-right: 1em;
-     }
-
+    }
     .bar {
-      margin-left: 0.5em;
-     }
-     .header {
-       border-bottom: 2px solid #6F7277;
-       color: #4B4A4A;
-       text-shadow: #ddf 1px 1px 0;
-     }
+      margin-left: 1em;
+    }
+    .header {
+      margin-left: 1em;
+      color: #4B4A4A;
+      text-shadow: #ddf 1px 1px 0;
+      margin-bottom: 0;
+    }
+    .underline {
+      border-bottom: 2px solid #6F7277;
+    }
   </ui:style>
+
   <g:HTMLPanel>
-    <h3 class='{style.header}' ui:field='editTitle'>
- <ui:msg>Report <g:InlineLabel ui:field='id' /> (v<g:InlineLabel ui:field='version'/>)</ui:msg>
-    </h3>
- <h3 class='{style.header}' ui:field='createTitle'><ui:msg>New Report</ui:msg></h3>
+    <div class='{style.underline}'>
+      <h3 class='{style.header}' ui:field='editTitle'>
+ <ui:msg>Report <g:InlineLabel ui:field='id' /> (v<g:InlineLabel ui:field='version'/>)</ui:msg>
+      </h3>
+ <h3 class='{style.header}' ui:field='createTitle'><ui:msg>New Report</ui:msg></h3>
+    </div>
     <div ui:field='errors' style='background-color: red; '></div>

     <table class='{style.fields}'>
- <tr><td><span class='{style.label}'>Purpose:</span></td><td><g:TextBox ui:field='purpose'></g:TextBox></td></tr> - <tr><td><span class='{style.label}'>Notes:</span></td><td><g:TextBox ui:field='notes'></g:TextBox></td></tr> - <tr><td><span class='{style.label}'>Created:</span></td><td><d:DateBox ui:field='created'></d:DateBox></td></tr> - <tr><td><span class='{style.label}'>Reporter Key:</span></td><td><g:TextBox ui:field='reporterKey'></g:TextBox></td></tr> - <tr><td><span class='{style.label}'>Approved Supervisor Key:</span></td><td><g:TextBox ui:field='approvedSupervisorKey'></g:TextBox></td></tr> + <tr><td><div class='{style.label}'>Purpose:</div></td><td><g:TextBox ui:field='purpose'></g:TextBox></td></tr> + <tr><td><div class='{style.label}'>Notes:</div></td><td><g:TextBox ui:field='notes'></g:TextBox></td></tr> + <tr><td><div class='{style.label}'>Created:</div></td><td><d:DateBox ui:field='created'></d:DateBox></td></tr> + <tr><td><div class='{style.label}'>Reporter Key:</div></td><td><g:TextBox ui:field='reporterKey'></g:TextBox></td></tr> + <tr><td><div class='{style.label}'>Approved Supervisor Key:</div></td><td><g:TextBox ui:field='approvedSupervisorKey'></g:TextBox></td></tr>
     </table>

     <div class='{style.bar}'>
- <g:Button addStyleNames='{style.button}' ui:field='save'>Save</g:Button> - <g:Button addStyleNames='{style.button}' ui:field='cancel'>Cancel</g:Button> + <g:Button addStyleNames='{style.button}' ui:field='save'>Save</g:Button> + <g:Button addStyleNames='{style.button}' ui:field='cancel'>Cancel</g:Button>
     </div>

   </g:HTMLPanel>
=======================================
--- /branches/2.1/bikeshed/src/com/google/gwt/sample/expenses/gwt/ui/report/ReportListView.ui.xml Tue May 11 09:04:15 2010 +++ /branches/2.1/bikeshed/src/com/google/gwt/sample/expenses/gwt/ui/report/ReportListView.ui.xml Wed May 12 14:48:39 2010
@@ -30,9 +30,14 @@
     .controls button {
        display:inline;
      }
-     .listView table {
+     .listView > table {
        table-layout:fixed;
-       word-wrap: break-word;
+     }
+     .listView > table td {
+       text-overflow: ellipsis;
+       overflow: hidden;
+       white-space: nowrap;
+       cursor: pointer;
      }
   </ui:style>

=======================================
--- /branches/2.1/bikeshed/war/Scaffold.html    Wed Apr 28 13:19:55 2010
+++ /branches/2.1/bikeshed/war/Scaffold.html    Wed May 12 14:48:39 2010
@@ -16,13 +16,15 @@
 <html>
   <head>
     <meta http-equiv="content-type" content="text/html; charset=UTF-8">
-    <title>Expenses Entity Browser</title>
+    <title>Data Browser</title>
<script type="text/javascript" language="javascript" src="json2.js"></script> <script type="text/javascript" language="javascript" src="scaffold/scaffold.nocache.js"></script>
   </head>

   <body>
<iframe src="javascript:''" id="__gwt_historyFrame" tabIndex='-1' style="position:absolute;width:0;height:0;border:0"></iframe>
-  <span id='loading'><i>…loading…</i></span>
+ <span id='loading' style="margin-left:10px;font-size:12px;padding:10px;font-family:Helvetica;background-color:#e5edf9;border:2px solid #96a2b5;">
+    loading…
+  </span>
   </body>
 </html>

--
http://groups.google.com/group/Google-Web-Toolkit-Contributors

Reply via email to