You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@ode.apache.org by as...@apache.org on 2008/05/23 04:55:17 UTC

svn commit: r659382 - in /ode/sandbox/singleshot: app/helpers/application_helper.rb app/views/tasks/show.html.erb public/javascripts/application.js public/stylesheets/default.css

Author: assaf
Date: Thu May 22 19:55:16 2008
New Revision: 659382

URL: http://svn.apache.org/viewvc?rev=659382&view=rev
Log:
Styling improvement to expanded task details.

Modified:
    ode/sandbox/singleshot/app/helpers/application_helper.rb
    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/helpers/application_helper.rb
URL: http://svn.apache.org/viewvc/ode/sandbox/singleshot/app/helpers/application_helper.rb?rev=659382&r1=659381&r2=659382&view=diff
==============================================================================
--- ode/sandbox/singleshot/app/helpers/application_helper.rb (original)
+++ ode/sandbox/singleshot/app/helpers/application_helper.rb Thu May 22 19:55:16 2008
@@ -5,7 +5,7 @@
   # (or profile, if unspecified) as the reference.
   def link_to_person(person, *args)
     options = args.extract_options!
-    fullname = h(person.fullname)
+    fullname = person == authenticated ? 'you' : h(person.fullname)
     if person.url
       options.update :rel=>args.first if args.first
       link_to(fullname, person.url, options.merge(:title=>"See #{fullname}'s profile"))

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=659382&r1=659381&r2=659382&view=diff
==============================================================================
--- ode/sandbox/singleshot/app/views/tasks/show.html.erb (original)
+++ ode/sandbox/singleshot/app/views/tasks/show.html.erb Thu May 22 19:55:16 2008
@@ -4,17 +4,18 @@
   <div class='summary'>
     <h1><%= link_to 'Singleshot', root_url %></h1>
     <div class='vitals'><%= task_vitals(@task) %></div>
-    <div class='actions'><%= task_actions(@task) %> <%= link_to_function 'More Options', "Singleshot.expand(event, 'expanded', 'Less options')", :class=>'button-to' %></div>
+    <div class='actions'><%= task_actions(@task) %> <%= link_to_function 'More Options', "Singleshot.expand(event, '.expanded', 'Less options')", :class=>'button-to' %></div>
   </div>
-  <div id='expanded' class='expanded' style='display:none'>
+  <div class='expanded' style='display:none'>
     <%= link_to image_tag('calendar.png') + ' Calendar', formatted_task_url(@task, 'ics', :access_key=>authenticated.access_key),
-                :rel=>'alternate', :title=>'Add this task to your calendar' %>
-    <%= link_to image_tag('feed.png') + ' Activities', formatted_activity_url(@task, 'atom', :access_key=>authenticated.access_key),
-                :rel=>'alternate', :title=>'Subscribe to see changes to this task' %>
+        :rel=>'alternate', :title=>'Add this task to your calendar' %>
+    <%= link_to image_tag('feed.png') + ' Activity', formatted_activity_url(@task, 'atom', :access_key=>authenticated.access_key),
+        :rel=>'alternate', :title=>'Subscribe to see changes to this task' %>
+    <h2><%= h(@task.title) %></h2>
+    <div class='description'><%= h(@task.description) %></div>
     <dl>
-      <dt>Task</dt><dd><%= h(@task.title) %></dd>
-      <dt>Description</dt><dd><%= h(@task.description) %></dd>
       <dt>Priority</dt><dd><%= ['High', 'Medium', 'Low'][@task.priority - 1] %></dd>
+      <%= content_tag('dt', 'Due on') + content_tag('dd', relative_date(@task.due_on)) if @task.due_on %>
       <dt>Recent activity</dt>
       <dd>
         <ol class='activities hfeed'>
@@ -32,7 +33,8 @@
       <%= observers = @task.observers.map { |person| link_to_person(person, :observer) }
           content_tag('dt', 'Observers') + content_tag('dd', observers.to_sentence) unless observers.empty? %>
     </dl>
-    <div class='actions' style='text-align:right'>
+    <div class='actions'>
+      <%= button_to 'Some action' %>
       <%= task_actions(@task) %>
     </div>
   </div>

Modified: ode/sandbox/singleshot/public/javascripts/application.js
URL: http://svn.apache.org/viewvc/ode/sandbox/singleshot/public/javascripts/application.js?rev=659382&r1=659381&r2=659382&view=diff
==============================================================================
--- ode/sandbox/singleshot/public/javascripts/application.js (original)
+++ ode/sandbox/singleshot/public/javascripts/application.js Thu May 22 19:55:16 2008
@@ -12,7 +12,7 @@
   expand: function(event, target, alternative) {
     event = event || window.event;
     var source = Event.element(event);
-    target = $(target);
+    target = $$(target).first() || $(target);
     if (target.visible()) {
       source.innerHTML = source.originalText; 
       target.hide();

Modified: ode/sandbox/singleshot/public/stylesheets/default.css
URL: http://svn.apache.org/viewvc/ode/sandbox/singleshot/public/stylesheets/default.css?rev=659382&r1=659381&r2=659382&view=diff
==============================================================================
--- ode/sandbox/singleshot/public/stylesheets/default.css (original)
+++ ode/sandbox/singleshot/public/stylesheets/default.css Thu May 22 19:55:16 2008
@@ -270,7 +270,7 @@
 #task_bar div.summary div.actions {
   display: inline;
   position: absolute;
-  right: 2em;
+  right: 3em;
   top: 0.5em;
 }
 #task_bar div.summary .button-to {
@@ -283,6 +283,25 @@
   border-top: 1px solid #ccc;
   margin: 0;
 }
+#task_bar div.expanded a[rel=alternate] {
+  float: right;
+  padding-left: 1em;
+  text-decoration: none;
+}
+#task_bar div.expanded a[rel=alternate] img {
+  border: none;
+  vertical-align: bottom;
+  margin: 0.1em;
+}
+#task_bar div.expanded h2 {
+  font-size: 1.2em;
+  margin: 0 0 1em 0;
+}
+#task_bar div.expanded div.description {
+  margin: 1em 0 1em 0;
+}
+#task_bar div.expanded dl {
+}
 #task_bar div.expanded dt {
   font-weight: bold;
   display: inline;
@@ -291,20 +310,15 @@
 #task_bar div.expanded dd {
   margin: 0 0 1em 10em;
 }
-#task_bar div.expanded dd ol.activities {
+#task_bar div.expanded ol.activities {
   margin: 0;
+  padding: 0;
 }
-#task_bar div.expanded a[rel=alternate] {
-  float: right;
-  padding-left: 1em;
-  text-decoration: none;
-}
-#task_bar div.expanded a[rel=alternate] img {
-  border: none;
-  vertical-align: bottom;
-  margin: 0.1em;
+#task_bar div.expanded div.actions {
+  text-align: right;
 }
 
+
 iframe#task_frame {
   border:0;
   width:100%;