From 22a9519bd720fef54ec0903f333eda22cb5bd276 Mon Sep 17 00:00:00 2001 From: lukemelia Date: Wed, 18 Apr 2007 06:45:09 +0000 Subject: [PATCH] I did some CSS work on the appearance of Tracks. Nothing major, just some subtle improvements, hopefully. Haven't checked it out outside of Firefox yet. git-svn-id: http://www.rousette.org.uk/svn/tracks-repos/trunk@537 a4c988fc-2ded-0310-b66e-134b36920a42 --- tracks/app/views/projects/_project.rhtml | 2 +- .../app/views/shared/_add_new_item_form.rhtml | 36 +++-- tracks/app/views/todos/completed.rhtml | 6 +- tracks/public/images/container-gradient.png | Bin 0 -> 138 bytes tracks/public/images/new-action-gradient.png | Bin 0 -> 161 bytes tracks/public/javascripts/todo-items.js | 20 +++ tracks/public/stylesheets/standard.css | 144 ++++++++++++++---- 7 files changed, 164 insertions(+), 44 deletions(-) create mode 100644 tracks/public/images/container-gradient.png create mode 100644 tracks/public/images/new-action-gradient.png diff --git a/tracks/app/views/projects/_project.rhtml b/tracks/app/views/projects/_project.rhtml index df79822a..ad0db62f 100644 --- a/tracks/app/views/projects/_project.rhtml +++ b/tracks/app/views/projects/_project.rhtml @@ -8,7 +8,7 @@ <%= project.name %> <%= in_place_editor 'project_name_in_place_editor', { :url => { :controller => 'projects', :action => 'update', :id => project.id, :field => 'name', :wants_render => false, :escape => false} , :options=>"{method:'put'}" } %> - <% if @project.description -%> + <% unless @project.description.blank? -%>
<%= sanitize(@project.description) %>
<% end -%> diff --git a/tracks/app/views/shared/_add_new_item_form.rhtml b/tracks/app/views/shared/_add_new_item_form.rhtml index 7e3b0473..8869ecf0 100644 --- a/tracks/app/views/shared/_add_new_item_form.rhtml +++ b/tracks/app/views/shared/_add_new_item_form.rhtml @@ -5,10 +5,18 @@ @initial_context_name ||= @contexts[0].name unless @contexts[0].nil? @initial_project_name = @project.name unless @project.nil? %> +
-<%= link_to_function("Add a next action »", - "Element.toggle('todo_new_action');Form.focusFirstElement('todo-form-new-action');", - {:title => "Add a next action", :accesskey => "n"}) %> + +
+ <%= link_to_function("« Hide form", + "todoItems.hideNewActionForm();return false;", + {:title => "Hide next action form", :accesskey => "n"}) %> +
@@ -20,13 +28,13 @@
<%= error_messages_for("item") %>
-<%= text_field( "todo", "description", "size" => 25, "tabindex" => 1) %> +<%= text_field( "todo", "description", "size" => 30, "tabindex" => 1) %> -<%= text_area( "todo", "notes", "cols" => 25, "rows" => 6, "tabindex" => 2) %> +<%= text_area( "todo", "notes", "cols" => 29, "rows" => 6, "tabindex" => 2) %> - + - + -<%= text_field_tag "tag_list", nil, :size => 40, :tabindex => 5 %> +<%= text_field_tag "tag_list", nil, :size => 30, :tabindex => 5 %> +
-<%= text_field("todo", "due", "size" => 10, "class" => "Date", "onfocus" => "Calendar.setup", "tabindex" => 6, "autocomplete" => "off") %> +<%= text_field("todo", "due", "size" => 12, "class" => "Date", "onfocus" => "Calendar.setup", "tabindex" => 6, "autocomplete" => "off") %> +
+
- <%= text_field("todo", "show_from", "size" => 10, "class" => "Date", "onfocus" => "Calendar.setup", "tabindex" => 7, "autocomplete" => "off") %> + <%= text_field("todo", "show_from", "size" => 12, "class" => "Date", "onfocus" => "Calendar.setup", "tabindex" => 7, "autocomplete" => "off") %> +
+ <%= source_view_tag( @source_view ) %> -
+
<% end -%> <%= calendar_setup( "todo_due" ) %> <%= calendar_setup( "todo_show_from" ) %>
+
\ No newline at end of file diff --git a/tracks/app/views/todos/completed.rhtml b/tracks/app/views/todos/completed.rhtml index 2086db79..72b9eb15 100644 --- a/tracks/app/views/todos/completed.rhtml +++ b/tracks/app/views/todos/completed.rhtml @@ -2,21 +2,21 @@

You have completed <%= pluralize @done_today.length, 'action' %> so far today.

Completed in the last 24 hours

- +
<%= render :partial => "done", :collection => @done_today %>

Completed in last 7 days

- +
<%= render :partial => "done", :collection => @done_this_week %>

Completed in the last 28 days

- +
<%= render :partial => "done", :collection => @done_this_month %>
diff --git a/tracks/public/images/container-gradient.png b/tracks/public/images/container-gradient.png new file mode 100644 index 0000000000000000000000000000000000000000..e4043a786a65883f395dc5b56aec03cb78a7b0ce GIT binary patch literal 138 zcmeAS@N?(olHy`uVBq!ia0vp^zkryPg9%7J_DWj@qyjx%978JRyq#po$DqK$-2J~^ zs=p}J;Ff}#+847++3IKRGBOw#vpm|_dFk2ixkdKjisco(>*L*yPZ1PK%Pl{-Vy^I` n^e^ug309R~Crv*0001JNkl div { @@ -391,35 +455,35 @@ h4.notice { color: #fff; background: #f00; padding: 1px; - font-size: 10px; + font-size: 85%; } .amber { color: #fff; background: #ff6600; padding: 1px; - font-size: 10px; + font-size: 85%; } .orange { color: #fff; background: #FFA500; padding: 1px; - font-size: 10px; + font-size: 85%; } .green { color: #fff; background: #33cc00; padding: 1px; - font-size: 10px; + font-size: 85%; } .grey { color: #fff; background: #999; - padding: 1px; - font-size: 10px; + padding: 2px; + font-size: 85%; } .info { @@ -463,6 +527,11 @@ h4.notice { ul { list-style-type: none; } + +#sidebar h3 { + margin-top:15px; + margin-bottom:5px; +} #sidebar ul { margin-left: auto; @@ -502,10 +571,6 @@ input { /* Positioning the 'cells' in the list */ -.position { - float: left; - } - img.position, a:hover img.position { text-align: left; vertical-align: middle; @@ -529,7 +594,9 @@ div#list-active-projects, div#list-hidden-projects, div#list-completed-projects, clear:right; border: 1px solid #999; } - +.project-state-group h2 { + margin:20px 0px 8px 13px; +} div.alpha_sort { margin-top:-20px; float:right; @@ -589,6 +656,17 @@ form { .inline-form table td.label { width: 13ex; } +#todo_new_action_container { + background:#ddd; + width:270px; + padding:5px; + background-image: url('/images/new-action-gradient.png'); + background-repeat: repeat-x; + background-position: top; +} +#hide_todo_new_action { + text-align:right; +} #todo-form-new-action label { display:block; } @@ -604,7 +682,7 @@ label { padding: 0px 0px; } -input, select { +input, select, textarea { margin: 0px 0px 5px 0px; } @@ -622,12 +700,16 @@ input, select { } /* Classes for Drag and Drop */ +.position { + float: left; + margin-top:2px; + } .handle { color: #fff; background: #000; - padding: 1px; - font-size: 10px; - cursor: move; + padding: 2px; + font-size: 92%; + cursor: move; } div.message { @@ -774,6 +856,10 @@ div.page_name_auto_complete ul strong.highlight { padding: 0; } +table.next_actions td { + padding:5px 3px 2px 0px; +} + table.users_table { width: 100%; text-align: center;