Main changes are to login and session management:

* Added Luke Melia's patch to warn the user when the session has timed out when the user has added or checked off a next action without refreshing the page first. If they check off an item, they are redirected to the login page, then when they return, they are informed that the action has been checked off. If they add an item, they are informed after returning from the login page that the next action hasn't been added. Fixes #163.
  * Made some stylistic changes to login and signup pages to make them tidier, and to fit with the main theme better
  * Fixed bug with deleting items: the sheet which appeared was an alert (with only an 'OK' box, rather than a confirmation (with both an 'OK' and 'Cancel' box). Fixes #189.
  * Added a new feed icon to comply with the new de-facto standard: from [http://www.feedicons.com/ Feed Icons].



git-svn-id: http://www.rousette.org.uk/svn/tracks-repos/trunk@172 a4c988fc-2ded-0310-b66e-134b36920a42
This commit is contained in:
bsag 2006-01-08 13:21:24 +00:00
parent c58f41775c
commit d0a542f625
26 changed files with 212 additions and 146 deletions

View file

@ -29,7 +29,7 @@ class ApplicationController < ActionController::Base
end end
total = Todo.find_all("done=0").length - sub total = Todo.find_all("done=0").length - sub
end end
# Reverses the urlize() method by substituting underscores for spaces # Reverses the urlize() method by substituting underscores for spaces
# #
def deurlize(name) def deurlize(name)
@ -53,21 +53,4 @@ class ApplicationController < ActionController::Base
end end
end end
# Renders the given hash as xml. Primarily used to send multiple
# partials back to an ajax request
#
# * +renders+ is a Hash where the keys are string identifiers,
# and the values are partials rendered as a strings (see
# <tt>render_to_string</tt>).
def renders_to_xml(renders)
xml = '<?xml version="1.0" encoding="ISO-8859-1"?><renders>'
renders.each_key do |key|
xml += "<" + key.to_s +
"><![CDATA[#{renders[key]}]]></" +
key.to_s + ">"
end
xml += '</renders>'
render(:text => xml)
end
end end

View file

@ -65,10 +65,11 @@ class ContextController < ApplicationController
# fallback for standard requests # fallback for standard requests
if @saved if @saved
flash["warning"] = 'Added new next action' flash["notice"] = 'Added new next action.'
redirect_to :action => 'show', :id => @item redirect_to :controller => 'todo', :action => 'list'
else else
#render :action => 'new' flash["warning"] = 'The next action was not added. Please try again.'
redirect_to :controller => 'todo', :action => 'list'
end end
rescue rescue
@ -76,7 +77,7 @@ class ContextController < ApplicationController
render :action => 'error' render :action => 'error'
else else
flash["warning"] = 'An error occurred on the server.' flash["warning"] = 'An error occurred on the server.'
#render :action => 'new' redirect_to :controller => 'todo', :action => 'list'
end end
end end
@ -93,7 +94,7 @@ class ContextController < ApplicationController
# fallback for standard requests # fallback for standard requests
if @saved if @saved
flash["warning"] = 'Successfully deleted next action' flash["notice"] = 'Successfully deleted next action'
redirect_to :controller => 'todo', :action => 'list' redirect_to :controller => 'todo', :action => 'list'
else else
render :controller => 'todo', :action => 'list' render :controller => 'todo', :action => 'list'

View file

@ -4,6 +4,7 @@ class FeedController < ApplicationController
helper :feed helper :feed
model :todo, :context, :project model :todo, :context, :project
session :disabled => true # Prevents session control from interfering with feed
before_filter :check_token_against_user_word before_filter :check_token_against_user_word

View file

@ -1,6 +1,6 @@
class LoginController < ApplicationController class LoginController < ApplicationController
model :user model :user
layout 'scaffold' layout 'login'
def login def login
@page_title = "Login" @page_title = "Login"
@ -61,6 +61,8 @@ class LoginController < ApplicationController
def logout def logout
@session['user'] = nil @session['user'] = nil
reset_session reset_session
flash['notice'] = "You have been logged out of Tracks."
redirect_to :controller => "login", :action => "login"
end end
def welcome def welcome

View file

@ -84,10 +84,11 @@ class ProjectController < ApplicationController
# fallback for standard requests # fallback for standard requests
if @saved if @saved
flash["warning"] = 'Added new next action' flash["notice"] = 'Added new next action.'
redirect_to :action => 'show', :name => urlize(@item.project.name) redirect_to :controller => 'todo', :action => 'list'
else else
#render :action => 'new' flash["warning"] = 'The next action was not added. Please try again.'
redirect_to :controller => 'todo', :action => 'list'
end end
rescue rescue
@ -95,7 +96,7 @@ class ProjectController < ApplicationController
render :action => 'error' render :action => 'error'
else else
flash["warning"] = 'An error occurred on the server.' flash["warning"] = 'An error occurred on the server.'
#render :action => 'new' redirect_to :controller => 'todo', :action => 'list'
end end
end end
@ -112,7 +113,7 @@ class ProjectController < ApplicationController
# fallback for standard requests # fallback for standard requests
if @saved if @saved
flash["warning"] = 'Successfully deleted next action' flash["notice"] = 'Successfully deleted next action'
redirect_to :controller => 'todo', :action => 'list' redirect_to :controller => 'todo', :action => 'list'
else else
render :controller => 'todo', :action => 'list' render :controller => 'todo', :action => 'list'

View file

@ -57,10 +57,11 @@ class TodoController < ApplicationController
# fallback for standard requests # fallback for standard requests
if @saved if @saved
flash["warning"] = 'Added new next action' flash["notice"] = 'Added new next action.'
redirect_to :action => 'list' redirect_to :action => 'list'
else else
render :action => 'list' flash["warning"] = 'The next action was not added. Please try again.'
redirect_to :action => 'list'
end end
rescue rescue
@ -88,7 +89,12 @@ class TodoController < ApplicationController
item.toggle!('done') item.toggle!('done')
item.completed = Time.now() # For some reason, the before_save in todo.rb stopped working item.completed = Time.now() # For some reason, the before_save in todo.rb stopped working
if item.save if item.save
render :partial => 'item', :object => item if request.xhr?
render :partial => 'item', :object => item
else
flash['notice'] = "The item <strong>'#{item.description}'</strong> was marked as <strong>#{item.done? ? 'complete' : 'incomplete' }</strong>"
redirect_to :action => "list"
end
end end
end end
@ -129,7 +135,7 @@ class TodoController < ApplicationController
# fallback for standard requests # fallback for standard requests
if @saved if @saved
flash["warning"] = 'Successfully deleted next action' flash["notice"] = 'Successfully deleted next action'
redirect_to :action => 'list' redirect_to :action => 'list'
else else
render :action => 'list' render :action => 'list'

View file

@ -7,15 +7,12 @@ module TodoHelper
end end
def form_remote_tag_toggle_todo( item ) def form_remote_tag_toggle_todo( item )
target_div = item.done? ? "new_actions" : "completed" target_div = item.done? ? "c#{item.context_id}" : "completed"
target_position = item.done? ? "bottom" : "top" target_position = item.done? ? "bottom" : "top"
form_id = "checkbox-#{item.id}-form" form_id = "checkbox-#{item.id}-form"
item_container_id = "item-#{item.id}-container" item_container_id = "item-#{item.id}-container"
loading_javascript = "Form.disable('#{form_id}');" loading_javascript = "Form.disable('#{form_id}');"
if item.done?
loading_javascript << visual_effect(:appear, "new_actions", :duration => 0.4)
end
success_javascript = " $('#{item_container_id}').setAttribute('id','#{item_container_id}-fading');" success_javascript = " $('#{item_container_id}').setAttribute('id','#{item_container_id}-fading');"
success_javascript << visual_effect( :fade, "#{item_container_id}-fading", success_javascript << visual_effect( :fade, "#{item_container_id}-fading",
@ -43,7 +40,8 @@ module TodoHelper
def link_to_remote_todo( item, handled_by) def link_to_remote_todo( item, handled_by)
str = link_to_remote( image_tag("blank", :title =>"Delete action", :class=>"delete_item"), str = link_to_remote( image_tag("blank", :title =>"Delete action", :class=>"delete_item"),
{:url => { :controller => handled_by, :action => "destroy_action", :id => item.id }}, {:url => { :controller => handled_by, :action => "destroy_action", :id => item.id },
:confirm => "Are you sure that you want to delete the action, \'#{item.description}\'?"},
{:class => "icon"}) + "\n" {:class => "icon"}) + "\n"
if !item.done? if !item.done?
str << link_to_remote( image_tag("blank", :title =>"Edit action", :class=>"edit_item", :id=>"action-#{item.id}-edit-icon"), str << link_to_remote( image_tag("blank", :title =>"Edit action", :class=>"edit_item", :id=>"action-#{item.id}-edit-icon"),

View file

@ -1,7 +1,5 @@
if @saved if @saved
page.alert "Are you sure that you want to delete the next action: \'#{@item.description}\'?" page.visual_effect :fade, "item-#{@item.id}-container", :duration => 0.4
page.visual_effect :fade, "item-#{@item.id}-container", :duration => 2.0
page.remove "item-#{@item.id}-container"
page.replace_html "badge_count", @down_count page.replace_html "badge_count", @down_count
if @down_count == "0" if @down_count == "0"
page.show 'empty-nd' page.show 'empty-nd'

View file

@ -1,5 +1,10 @@
<div id="display_box"> <div id="display_box">
<% if @flash["notice"] %>
<div id="notice" class="confirmation"><%= @flash["notice"] %></div>
<% end %>
<% if @flash["warning"] -%>
<div id="warning" class="warning"><%= @flash["warning"] %></div>
<% end -%>
<%= render :partial => "context/context", :locals => { :context => @context, :collapsible => false } %> <%= render :partial => "context/context", :locals => { :context => @context, :collapsible => false } %>
<%= render :partial => "todo/completed", :locals => { :done => @done, :collapsible => false, :append_descriptor => "in this context" } %> <%= render :partial => "todo/completed", :locals => { :done => @done, :collapsible => false, :append_descriptor => "in this context" } %>
@ -9,8 +14,4 @@
<%= render :partial => "shared/add_new_item_form", :locals => {:hide_link => false, :msg => ""} %> <%= render :partial => "shared/add_new_item_form", :locals => {:hide_link => false, :msg => ""} %>
<%= render "shared/sidebar" %> <%= render "shared/sidebar" %>
</div><!-- End of input box --> </div><!-- End of input box -->
<% if @flash["warning"] %>
<div id="warning_box" class="warning"><%= @flash["warning"] %></div>
<% end %>

View file

@ -7,11 +7,6 @@
</head> </head>
<body> <body>
<div id="navcontainer">
<ul id="navlist">
<li><%= link_to "Home", :controller => "todo", :action=>"list"%></li>
</ul>
</div>
<%= @content_for_layout %> <%= @content_for_layout %>

View file

@ -34,7 +34,7 @@
<li><%= link_to( "Notes", {:controller => "note", :action => "index"}, :title => "Show all notes" ) %></li> <li><%= link_to( "Notes", {:controller => "note", :action => "index"}, :title => "Show all notes" ) %></li>
<li><a href="javascript:toggleAll('notes','block')" accesskey="S" title="Show all notes">Show</a></li> <li><a href="javascript:toggleAll('notes','block')" accesskey="S" title="Show all notes">Show</a></li>
<li><a href="javascript:toggleAll('notes','none')" accesskey="H" title="Hide all notes">Hide</a></li> <li><a href="javascript:toggleAll('notes','none')" accesskey="H" title="Hide all notes">Hide</a></li>
<li><%= link_to("<span class=\"feed\">RSS</span>", {:controller => "feed", :action => "na_feed", :name => "#{@session['user']['login']}", :token => "#{@session['user']['word']}"}, :title => "Subscribe to an RSS feed of your next actions" ) %></li> <li><%= link_to(image_tag("feed-icon", :size => "16X16", :border => 0), {:controller => "feed", :action => "na_feed", :name => "#{@session['user']['login']}", :token => "#{@session['user']['word']}"}, :title => "Subscribe to an RSS feed of your next actions" ) %></li>
<li><%= link_to("<span class=\"feed\">TXT</span>", {:controller => "feed", :action => "na_text", :name => "#{@session['user']['login']}", :token => "#{@session['user']['word']}"}, :title => "View a plain text feed of your next actions" ) %></li> <li><%= link_to("<span class=\"feed\">TXT</span>", {:controller => "feed", :action => "na_text", :name => "#{@session['user']['login']}", :token => "#{@session['user']['word']}"}, :title => "View a plain text feed of your next actions" ) %></li>
<li><%= link_to "Logout (#{@session['user']['login']}) &#187;", :controller => "login", :action=>"logout"%></li> <li><%= link_to "Logout (#{@session['user']['login']}) &#187;", :controller => "login", :action=>"logout"%></li>
</ul> </ul>

View file

@ -0,0 +1 @@
page.redirect_to :controller => 'login', :action => 'login'

View file

@ -1,21 +1,29 @@
<%= start_form_tag :action=> "login" %> <%= start_form_tag :action=> "login" %>
<div title="Account login" id="loginform" class="form"> <div title="Account login" id="loginform" class="form">
<% if @flash["notice"] %><div id="notice"><%= @flash["notice"] %></div><% end %>
<h3>Please log in to use Tracks:</h3> <h3>Please log in to use Tracks:</h3>
<% if @message %> <% if @message %>
<div id="message"><%= @message %></div> <div id="message"><%= @message %></div>
<% end %> <% end %>
<label for="user_login">Login:&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</label> <table>
<input type="text" name="user_login" id="user_login" size="20" value=""/><br/> <tr>
<td><label for="user_login">Login:</label></td>
<label for="user_password">Password:</label> <td><input type="text" name="user_login" id="user_login" size="20" value=""/></td>
<input type="password" name="user_password" id="user_password" size="20"/> </tr>
<tr>
<br/> <td><label for="user_password">Password:</label></td>
<input type="submit" name="login" value="Login &#187;" class="primary" /> <td><input type="password" name="user_password" id="user_password" size="20"/></td>
</tr>
<tr>
<td></td>
<td><input type="submit" name="login" value="Login &#187;" class="primary" /></td>
</tr>
</table>
</div> </div>
<%= end_form_tag %> <%= end_form_tag %>

View file

@ -1,10 +0,0 @@
<div class="memo">
<h3>Logoff</h3>
<p>You are now logged out of the system...</p>
<%= link_to "&#171; login", :action=>"login"%>
</div>

View file

@ -3,22 +3,33 @@
<%= error_messages_for 'user' %><br/> <%= error_messages_for 'user' %><br/>
<% if @flash["notice"] %><div id="notice"><%= @flash["notice"] %></div><% end %>
<h3><%= @page_title -%></h3> <h3><%= @page_title -%></h3>
<label for="user_login">Desired login:</label><br/> <table>
<%= text_field "user", "login", :size => 20 %><br/> <tr>
<td><label for="user_login">Desired login:</label></td>
<label for="user_password">Choose password:</label><br/> <td> <%= text_field "user", "login", :size => 20 %></td>
<%= password_field "user", "password", :size => 20 %><br/> </tr>
<tr>
<label for="user_password_confirmation">Confirm password:</label><br/> <td><label for="user_password">Choose password:</label></td>
<%= password_field "user", "password_confirmation", :size => 20 %><br/> <td><%= password_field "user", "password", :size => 20 %></td>
</tr>
<label for="user_word">Secret word (different to password):</label><br /> <tr>
<%= password_field "user", "word", :size => 20 %><br /> <td><label for="user_password_confirmation">Confirm password:</label></td>
<td><%= password_field "user", "password_confirmation", :size => 20 %></td>
<input type="submit" value="Signup &#187;" class="primary" /> </tr>
<tr>
<td><label for="user_word">Secret word*:</label></td>
<td><%= password_field "user", "word", :size => 20 %></td>
</tr>
<tr>
<td>* different to password</td>
<td><input type="submit" value="Signup &#187;" class="primary" /></td>
</tr>
</table>
<%= end_form_tag %> <%= end_form_tag %>
</div> </div>

View file

@ -1,7 +1,5 @@
if @saved if @saved
page.alert "Are you sure that you want to delete the next action: \'#{@item.description}\'?" page.visual_effect :fade, "item-#{@item.id}-container", :duration => 0.4
page.visual_effect :fade, "item-#{@item.id}-container", :duration => 2.0
page.remove "item-#{@item.id}-container"
page.replace_html "badge_count", @down_count page.replace_html "badge_count", @down_count
if @down_count == "0" if @down_count == "0"
page.show 'empty-nd' page.show 'empty-nd'

View file

@ -1,5 +1,10 @@
<div id="display_box"> <div id="display_box">
<% if @flash["notice"] %>
<div id="notice" class="confirmation"><%= @flash["notice"] %></div>
<% end %>
<% if @flash["warning"] -%>
<div id="warning" class="warning"><%= @flash["warning"] %></div>
<% end -%>
<%= render :partial => "project/project", :locals => { :project => @project, :collapsible => false } %> <%= render :partial => "project/project", :locals => { :project => @project, :collapsible => false } %>
<%= render :partial => "todo/completed", :locals => { :done => @done, :collapsible => false, :append_descriptor => "in this project" } %> <%= render :partial => "todo/completed", :locals => { :done => @done, :collapsible => false, :append_descriptor => "in this project" } %>
@ -42,6 +47,3 @@
<%= render "shared/_add_new_item_form" %> <%= render "shared/_add_new_item_form" %>
<%= render "shared/sidebar" %> <%= render "shared/sidebar" %>
</div><!-- End of input box --> </div><!-- End of input box -->
<% if @flash["confirmation"] %><div class="confirmation"><%= @flash["confirmation"] %></div><% end %>
<% if @flash["warning"] %><div class="warning"><%= @flash["warning"] %></div><% end %>

View file

@ -1,7 +1,5 @@
if @saved if @saved
page.alert "Are you sure that you want to delete the next action: \'#{@item.description}\'?" page.visual_effect :fade, "item-#{@item.id}-container", :duration => 0.4
page.visual_effect :fade, "item-#{@item.id}-container", :duration => 2.0
page.remove "item-#{@item.id}-container"
page.replace_html "badge_count", @down_count page.replace_html "badge_count", @down_count
else else
page.replace_html "status", content_tag("div", content_tag("h2", "#{pluralize(@item.errors.count, "error")} prohibited this record from being saved") + content_tag("p", "There were problems with the following fields:") + content_tag("ul", @item.errors.each_full { |msg| content_tag("li", msg) }), "id" => "ErrorExplanation", "class" => "ErrorExplanation") page.replace_html "status", content_tag("div", content_tag("h2", "#{pluralize(@item.errors.count, "error")} prohibited this record from being saved") + content_tag("p", "There were problems with the following fields:") + content_tag("ul", @item.errors.each_full { |msg| content_tag("li", msg) }), "id" => "ErrorExplanation", "class" => "ErrorExplanation")

View file

@ -1,4 +1,10 @@
<div id="display_box"> <div id="display_box">
<% if @flash["notice"] %>
<div id="notice" class="confirmation"><%= @flash["notice"] %></div>
<% end %>
<% if @flash["warning"] -%>
<div id="warning" class="warning"><%= @flash["warning"] %></div>
<% end -%>
<%= render :partial => "context/context", :collection => @contexts_to_show, <%= render :partial => "context/context", :collection => @contexts_to_show,
:locals => { :collapsible => true } %> :locals => { :collapsible => true } %>
<%= render :partial => "todo/completed", <%= render :partial => "todo/completed",
@ -8,9 +14,4 @@
<div id="input_box"> <div id="input_box">
<%= render :partial => "shared/add_new_item_form", :locals => {:hide_link => false, :msg => ""} %> <%= render :partial => "shared/add_new_item_form", :locals => {:hide_link => false, :msg => ""} %>
<%= render "shared/sidebar" %> <%= render "shared/sidebar" %>
</div><!-- End of input box --> </div><!-- End of input box -->
<div class="status-box" id="confirmation-box"></div>
<% if @flash["warning"] -%>
<div class="warning"><%= @flash["warning"] %></div>
<% end -%>

View file

@ -50,5 +50,6 @@ end
# Include your application configuration below # Include your application configuration below
def app_configurations def app_configurations
YAML::load(File.open("#{RAILS_ROOT}/config/settings.yml")) @app_cfg = nil if ENV['RAILS_ENV'] == 'development'
@app_cfg ||= YAML::load(File.open("#{RAILS_ROOT}/config/settings.yml"))
end end

49
tracks/db/schema.rb Normal file
View file

@ -0,0 +1,49 @@
# This file is autogenerated. Instead of editing this file, please use the
# migrations feature of ActiveRecord to incrementally modify your database, and
# then regenerate this schema definition.
ActiveRecord::Schema.define(:version => 5) do
create_table "contexts", :force => true do |t|
t.column "name", :string, :default => "", :null => false
t.column "position", :integer, :default => 0, :null => false
t.column "hide", :boolean, :default => false
t.column "user_id", :integer, :default => 0, :null => false
end
create_table "notes", :force => true do |t|
t.column "user_id", :integer, :default => 0, :null => false
t.column "project_id", :integer, :default => 0, :null => false
t.column "body", :text
t.column "created_at", :datetime
t.column "updated_at", :datetime
end
create_table "projects", :force => true do |t|
t.column "name", :string, :default => "", :null => false
t.column "position", :integer, :default => 0, :null => false
t.column "done", :boolean, :default => false
t.column "user_id", :integer, :default => 0, :null => false
t.column "description", :text
end
create_table "todos", :force => true do |t|
t.column "context_id", :integer, :default => 0, :null => false
t.column "project_id", :integer
t.column "description", :string, :default => "", :null => false
t.column "notes", :text
t.column "done", :boolean, :default => false, :null => false
t.column "created_at", :datetime
t.column "due", :date
t.column "completed", :datetime
t.column "user_id", :integer, :default => 0, :null => false
end
create_table "users", :force => true do |t|
t.column "login", :string, :limit => 80, :default => "", :null => false
t.column "password", :string, :limit => 40, :default => "", :null => false
t.column "word", :string
t.column "is_admin", :boolean, :default => false, :null => false
end
end

View file

@ -65,7 +65,11 @@ module LoginSystem
# example use : # example use :
# a popup window might just close itself for instance # a popup window might just close itself for instance
def access_denied def access_denied
redirect_to :controller=>"login", :action =>"login" if request.xhr?
render :partial => 'login/redirect_to_login'
else
redirect_to :controller=>"login", :action =>"login"
end
end end
# store current uri in the session. # store current uri in the session.

Binary file not shown.

After

Width:  |  Height:  |  Size: 764 B

View file

@ -33,15 +33,6 @@ function addOneAjaxToDoItemCheckmarkHandling(elem)
addEvent(document.getElementsByClassName('item-checkbox',elem)[0], "click", toggleTodoItemChecked); addEvent(document.getElementsByClassName('item-checkbox',elem)[0], "click", toggleTodoItemChecked);
} }
function hideContainerIfEmpty(containerElemId)
{
if (document.getElementsByClassName('item-container',$(containerElemId)).length == 0)
{
new Effect.Fade(containerElemId)
}
}
function getMarkUndoneTargetElem() function getMarkUndoneTargetElem()
{ {
return document.getElementsByClassName('container')[0]; return document.getElementsByClassName('container')[0];
@ -69,9 +60,9 @@ function toggleTodoItemChecked()
asynchronous:true, asynchronous:true,
evalScripts:true, evalScripts:true,
insertion:markingAsDone ? Insertion.Top : Insertion.Bottom, insertion:markingAsDone ? Insertion.Top : Insertion.Bottom,
onLoading:function(request){ Form.disable(checkboxForm); ensureVisibleWithEffectAppear(targetElemId); }, onLoading:function(request){ Form.disable(checkboxForm); removeFlashNotice(); ensureVisibleWithEffectAppear(targetElemId); },
onSuccess:function(request){ fadeAndRemoveItem(itemContainerElemId); }, onSuccess:function(request){ fadeAndRemoveItem(itemContainerElemId); },
onComplete:function(request){ new Effect.Highlight(itemContainerElemId,{}); addOneAjaxToDoItemCheckmarkHandling($(itemContainerElemId)); hideContainerIfEmpty('new_actions'); }, onComplete:function(request){ new Effect.Highlight(itemContainerElemId,{}); addOneAjaxToDoItemCheckmarkHandling($(itemContainerElemId)); },
parameters:Form.serialize(checkboxForm) parameters:Form.serialize(checkboxForm)
}); });
return false; return false;
@ -85,6 +76,15 @@ function fadeAndRemoveItem(itemContainerElemId)
new Effect.Fade(fadingElemId,{afterFinish:function(effect) { Element.remove(fadingElemId); }, duration:0.4}); new Effect.Fade(fadingElemId,{afterFinish:function(effect) { Element.remove(fadingElemId); }, duration:0.4});
} }
function removeFlashNotice()
{
var flashNotice = document.getElementById("notice");
if (flashNotice)
{
new Effect.Fade("notice",{afterFinish:function(effect) { Element.remove("notice"); }, duration:0.4});
}
}
function toggleNextActionListing() function toggleNextActionListing()
{ {
var itemsElem = findItemsElem(this); var itemsElem = findItemsElem(this);

View file

@ -8,12 +8,20 @@ body, ol, ul, td {
} }
p { p {
background: #ff9; background: #eee;
} }
a { color: #f00; padding: 3px; } a, a:link, a:active, a:visited {
a:visited { color: #f00; } color: #cc3334;
a:hover { color: #000; background-color: #f00; } text-decoration: none;
padding-left: 1px;
padding-right: 1px;
}
a:hover {
color: #fff;
background-color: #cc3334;
}
h1, h2, h3 { color: #333; font-family: verdana, arial, helvetica, sans-serif; text-align: center; } h1, h2, h3 { color: #333; font-family: verdana, arial, helvetica, sans-serif; text-align: center; }
h1 { font-size: 28px } h1 { font-size: 28px }
@ -28,6 +36,8 @@ pre {
font-size: 11px; font-size: 11px;
} }
td {background-color: #ff9;}
#scaffold-main { #scaffold-main {
width: 80%; width: 80%;
margin: 10px auto; margin: 10px auto;
@ -35,7 +45,7 @@ pre {
} }
div.form { div.form {
width: 25%; width: 30%;
margin: 100px auto; margin: 100px auto;
padding: 10px; padding: 10px;
border: 1px solid #999; border: 1px solid #999;
@ -50,6 +60,21 @@ div.memo {
background: #ff9; background: #ff9;
} }
.memo p { #notice {
background: #ff9; padding: 2px;
} border: 1px solid #007E00;
background-color: #c2ffc2;
color: #007E00;
margin-bottom: 15px;
text-align: center;
}
#footer {
clear: both;
background-color: #eee;
font-size: 0.8em;
text-align: center;
color: #999;
margin: 20px auto;
padding: 0px;
}

View file

@ -23,8 +23,7 @@ a, a:link, a:active, a:visited {
a:hover { a:hover {
color: #fff; color: #fff;
background-color: #cc3334; background-color: #cc3334;
} }
/* Rules for the icon links */ /* Rules for the icon links */
@ -132,24 +131,6 @@ a.show_notes:hover {background-image: url(../images/notes_on.png); background-re
border:0px; border:0px;
} }
/* Styling the 'Fresh Actions' box on the home page */
#new_actions {
padding: 0px 5px 2px 5px;
background: #E7FDDE;
border: 1px solid #57A620;
padding: 5px;
margin-bottom: 15px;
}
#new_actions h2 {
/* padding: 0 px 5px 0px 5px; */
color: #57A620;
background: transparent;
text-align: center;
}
#new_actions a {color: #cc3334; text-decoration: underline;}
h2 a, h2 a:link, h2 a:active, h2 a:visited { h2 a, h2 a:link, h2 a:active, h2 a:visited {
color: #666; color: #666;
text-decoration: none; text-decoration: none;
@ -272,6 +253,15 @@ a.footer_link {color: #cc3334; font-style: normal;}
a.footer_link:hover {color: #fff; background-color: #cc3334 !important;} a.footer_link:hover {color: #fff; background-color: #cc3334 !important;}
/* The alert box notifications */ /* The alert box notifications */
#notice {
padding: 2px;
border: 1px solid #007E00;
background-color: #c2ffc2;
color: #007E00;
margin-bottom: 15px;
text-align: center;
}
.confirmation { .confirmation {
border: 1px solid #007E00; border: 1px solid #007E00;
background-color: #c2ffc2; background-color: #c2ffc2;
@ -279,11 +269,13 @@ a.footer_link:hover {color: #fff; background-color: #cc3334 !important;}
text-align: center; text-align: center;
} }
.warning { #warning {
padding: 2px;
border: 1px solid #ED2E38; border: 1px solid #ED2E38;
background-color: #F6979C; background-color: #F6979C;
color: #ED2E38; color: #ED2E38;
text-align: left; margin-bottom: 15px;
text-align: center;
} }
.project_completed { .project_completed {
@ -554,4 +546,4 @@ div.message {
list-style: square; list-style: square;
} }
ul.warning { list-style-type: circle; font-size: 1em; } ul.warning { list-style-type: circle; font-size: 1em; }