Author: assaf
Date: Sun Jun 15 19:16:59 2008
New Revision: 668040

URL: http://svn.apache.org/viewvc?rev=668040&view=rev
Log:
Single task view now uses tabs like task lists does.

Modified:
    ode/sandbox/singleshot/app/views/tasks/show.html.erb
    ode/sandbox/singleshot/public/javascripts/application.js
    ode/sandbox/singleshot/public/stylesheets/default.css

Modified: ode/sandbox/singleshot/app/views/tasks/show.html.erb
URL: 
http://svn.apache.org/viewvc/ode/sandbox/singleshot/app/views/tasks/show.html.erb?rev=668040&r1=668039&r2=668040&view=diff
==============================================================================
--- ode/sandbox/singleshot/app/views/tasks/show.html.erb (original)
+++ ode/sandbox/singleshot/app/views/tasks/show.html.erb Sun Jun 15 19:16:59 
2008
@@ -3,18 +3,16 @@
   iframe_url = @task.rendering.render_url(performing) { { 
'task_url'=>task_for_person_url(@task, authenticated) } }
 %>
 <% div_for @task do %>
-  <div class='header'>
-    <h1><%= link_to 'Singleshot', tasks_url, :title=>'Back to tasks list' 
%></h1>
+  <div id='header'>
     <div class='actions'>
       <%= quick_actions(@task) %>
-      <%= content_tag 'button', 'More Options', 
:onclick=>"Singleshot.expand(event, '.header .details', 'Less options')", 
:class=>'button-to' %>
+      <%= content_tag 'button', 'More Options', 
:onclick=>"Singleshot.expand(event, 'details', 'Less options')", 
:class=>'button-to', :title=>'Click to reveal task details and more options' %>
       <%= button_to 'Completed', task_url(@task), :title=>'Click when task 
completed' if performing && @task.rendering.use_completion_button?  %>
     </div>
-    <div class='vitals'>
-      <p class='title'><%= h(@task.title) %></p>
-      <p class='info'><%= task_vitals(@task) %></p>
-    </div>
-    <div class='details' style='display:none'>
+    <ul class='tabs'><li><%= link_to truncate(@task.title, 50), '#', 
:class=>'current', :title=>truncate(strip_tags(@task.description), 250) 
%></li><li><%= link_to '➠ Inbox', tasks_url, :title=>'Return to tasks list' 
%></li></ul>
+    <!-- p class='info'><%= task_vitals(@task) %></p -->
+  </div>
+    <div id='details' style='display:none'>
       <dl>
         <%= content_tag('dt', 'Description') + content_tag('dd', 
sanitize(simple_format(@task.description))) if iframe_url %>
         <dt>Priority</dt><dd><%= ['High', 'Medium', 'Low'[EMAIL PROTECTED] - 
1] %></dd>
@@ -27,8 +25,6 @@
       </dl>
       <div class='actions'><%= task_actions(@task) %></div>
     </div>
-  </div>
-
   <% if iframe_url %>
     <iframe id='task_frame' src='<%= iframe_url %>'></iframe>
     <%= javascript_tag "Singleshot.setFrameSize('task_frame')" %>

Modified: ode/sandbox/singleshot/public/javascripts/application.js
URL: 
http://svn.apache.org/viewvc/ode/sandbox/singleshot/public/javascripts/application.js?rev=668040&r1=668039&r2=668040&view=diff
==============================================================================
--- ode/sandbox/singleshot/public/javascripts/application.js (original)
+++ ode/sandbox/singleshot/public/javascripts/application.js Sun Jun 15 
19:16:59 2008
@@ -21,7 +21,7 @@
     if (target.visible()) {
       if (source.originalText)
         source.innerHTML = source.originalText; 
-      target.hide();
+      target.slideUp({ duration: 0.5 });
     } else if (event.shiftKey || event.ctrlKey || event.metaKey) {
       return;
     } else {
@@ -29,7 +29,7 @@
         source.originalText = source.innerHTML;
         source.innerHTML = alternative;
       }
-      target.show();
+      target.slideDown({ duration: 0.5 });
     }
     Event.stop(event);
   },

Modified: ode/sandbox/singleshot/public/stylesheets/default.css
URL: 
http://svn.apache.org/viewvc/ode/sandbox/singleshot/public/stylesheets/default.css?rev=668040&r1=668039&r2=668040&view=diff
==============================================================================
--- ode/sandbox/singleshot/public/stylesheets/default.css (original)
+++ ode/sandbox/singleshot/public/stylesheets/default.css Sun Jun 15 19:16:59 
2008
@@ -6,6 +6,7 @@
   background-color: #fff;
   margin: 0;
   padding: 0;
+  width: 100%;
 }
 h1 {
   font-family: "Corbel", Helvetica;
@@ -138,6 +139,7 @@
 #header {
   background: #e9e9e9 url('/images/header-bg.jpg') repeat-x bottom;
   padding: 0.5em 3em 3px 3em;
+  margin: 0;
   border-bottom: solid 2px #898989;
 }
 #header h1 {
@@ -314,68 +316,55 @@
   padding: 0;
   background-color: #fff;
 }
-div.task div.header {
+div.task div#header {
   position: absolute;
-  width: 100%;
-  margin: 0;
-  padding: 0;
+  right: 0;
+  left: 0;
   background: #e9e9e9 url('/images/header-bg.jpg') repeat-x bottom;
-  border-bottom: solid 2px #898989;
-}
-div.task div.header h1 {
-  margin: 0.2em 1em 0 1.5em;
-  float: left;
-}
-div.task div.header h1 a {
-  color: #404040;
-}
-
-div.task div.header div.vitals {
-  white-space: nowrap;
-  text-overflow: ellipsis;
-  overflow: hidden;
-  margin: 0.6em auto 0.6em auto;
-}
-div.task div.header div.vitals p {
-  margin: 0 auto 0.3em auto;
-  text-overflow: ellipsis;
-  overflow: hidden;
-}
-div.task div.header div.vitals p.title {
-  font-weight: bold;
 }
-div.task div.header div.actions {
+div.task div#header div.actions {
   display: inline;
   float: right;
-  margin: 0.9em 2.5em 0.5em 0;
+  position: relative;
+  top: 0.6em;
   white-space: nowrap;
 }
-div.task div.header div.actions .button-to {
+div.task div#header div.actions .button-to {
   margin-left: 0.6em;
 }
 
-div.task div.details {
-  clear: both;
-  padding: 1em 3em 2em 3em;
-  margin: 0;
+div.task div#details {
+  position: absolute;
+  width: 100%;
+  top: 4em;
+  background-color: #fff;
+  border-bottom: solid 2px #898989;
 }
-div.task div.details dt {
+div.task div#details dl {
+  margin: 2em 3em 0 3em;
+}
+div.task div#details dt {
   font-weight: bold;
   float: left;
   position: relative;
   display: inline;
 }
-div.task div.details dd {
+div.task div#details dd {
   margin: 0 0 1em 10em;
   min-height: 1.3em;
 }
-div.task div.details ol.activities {
+div.task div#details ol.activities {
   margin: 0;
 }
-div.task div.details div.actions {
-  margin: 1em 0 1em 0;
+div.task div#details div.actions {
+  margin: 1em 3em 1em 3em;
+  display: inline;
+  float: right;
+}
+div.task div#details div.actions form {
+  margin-left: 0.6em;
 }
-div.task div.details div.actions select {
+div.task div#details div.actions select {
   width: 10em;
   margin: 0 0.6em 0 0.6em;
 }


Reply via email to