mirror of
https://github.com/TracksApp/tracks.git
synced 2025-12-16 23:30:12 +01:00
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:
parent
c58f41775c
commit
d0a542f625
26 changed files with 212 additions and 146 deletions
|
|
@ -29,7 +29,7 @@ class ApplicationController < ActionController::Base
|
|||
end
|
||||
total = Todo.find_all("done=0").length - sub
|
||||
end
|
||||
|
||||
|
||||
# Reverses the urlize() method by substituting underscores for spaces
|
||||
#
|
||||
def deurlize(name)
|
||||
|
|
@ -53,21 +53,4 @@ class ApplicationController < ActionController::Base
|
|||
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
|
||||
|
|
|
|||
|
|
@ -65,10 +65,11 @@ class ContextController < ApplicationController
|
|||
|
||||
# fallback for standard requests
|
||||
if @saved
|
||||
flash["warning"] = 'Added new next action'
|
||||
redirect_to :action => 'show', :id => @item
|
||||
flash["notice"] = 'Added new next action.'
|
||||
redirect_to :controller => 'todo', :action => 'list'
|
||||
else
|
||||
#render :action => 'new'
|
||||
flash["warning"] = 'The next action was not added. Please try again.'
|
||||
redirect_to :controller => 'todo', :action => 'list'
|
||||
end
|
||||
|
||||
rescue
|
||||
|
|
@ -76,7 +77,7 @@ class ContextController < ApplicationController
|
|||
render :action => 'error'
|
||||
else
|
||||
flash["warning"] = 'An error occurred on the server.'
|
||||
#render :action => 'new'
|
||||
redirect_to :controller => 'todo', :action => 'list'
|
||||
end
|
||||
end
|
||||
|
||||
|
|
@ -93,7 +94,7 @@ class ContextController < ApplicationController
|
|||
|
||||
# fallback for standard requests
|
||||
if @saved
|
||||
flash["warning"] = 'Successfully deleted next action'
|
||||
flash["notice"] = 'Successfully deleted next action'
|
||||
redirect_to :controller => 'todo', :action => 'list'
|
||||
else
|
||||
render :controller => 'todo', :action => 'list'
|
||||
|
|
|
|||
|
|
@ -4,6 +4,7 @@ class FeedController < ApplicationController
|
|||
|
||||
helper :feed
|
||||
model :todo, :context, :project
|
||||
session :disabled => true # Prevents session control from interfering with feed
|
||||
|
||||
before_filter :check_token_against_user_word
|
||||
|
||||
|
|
|
|||
|
|
@ -1,6 +1,6 @@
|
|||
class LoginController < ApplicationController
|
||||
model :user
|
||||
layout 'scaffold'
|
||||
layout 'login'
|
||||
|
||||
def login
|
||||
@page_title = "Login"
|
||||
|
|
@ -61,6 +61,8 @@ class LoginController < ApplicationController
|
|||
def logout
|
||||
@session['user'] = nil
|
||||
reset_session
|
||||
flash['notice'] = "You have been logged out of Tracks."
|
||||
redirect_to :controller => "login", :action => "login"
|
||||
end
|
||||
|
||||
def welcome
|
||||
|
|
|
|||
|
|
@ -84,10 +84,11 @@ class ProjectController < ApplicationController
|
|||
|
||||
# fallback for standard requests
|
||||
if @saved
|
||||
flash["warning"] = 'Added new next action'
|
||||
redirect_to :action => 'show', :name => urlize(@item.project.name)
|
||||
flash["notice"] = 'Added new next action.'
|
||||
redirect_to :controller => 'todo', :action => 'list'
|
||||
else
|
||||
#render :action => 'new'
|
||||
flash["warning"] = 'The next action was not added. Please try again.'
|
||||
redirect_to :controller => 'todo', :action => 'list'
|
||||
end
|
||||
|
||||
rescue
|
||||
|
|
@ -95,7 +96,7 @@ class ProjectController < ApplicationController
|
|||
render :action => 'error'
|
||||
else
|
||||
flash["warning"] = 'An error occurred on the server.'
|
||||
#render :action => 'new'
|
||||
redirect_to :controller => 'todo', :action => 'list'
|
||||
end
|
||||
end
|
||||
|
||||
|
|
@ -112,7 +113,7 @@ class ProjectController < ApplicationController
|
|||
|
||||
# fallback for standard requests
|
||||
if @saved
|
||||
flash["warning"] = 'Successfully deleted next action'
|
||||
flash["notice"] = 'Successfully deleted next action'
|
||||
redirect_to :controller => 'todo', :action => 'list'
|
||||
else
|
||||
render :controller => 'todo', :action => 'list'
|
||||
|
|
|
|||
|
|
@ -57,10 +57,11 @@ class TodoController < ApplicationController
|
|||
|
||||
# fallback for standard requests
|
||||
if @saved
|
||||
flash["warning"] = 'Added new next action'
|
||||
flash["notice"] = 'Added new next action.'
|
||||
redirect_to :action => 'list'
|
||||
else
|
||||
render :action => 'list'
|
||||
flash["warning"] = 'The next action was not added. Please try again.'
|
||||
redirect_to :action => 'list'
|
||||
end
|
||||
|
||||
rescue
|
||||
|
|
@ -88,7 +89,12 @@ class TodoController < ApplicationController
|
|||
item.toggle!('done')
|
||||
item.completed = Time.now() # For some reason, the before_save in todo.rb stopped working
|
||||
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
|
||||
|
||||
|
|
@ -129,7 +135,7 @@ class TodoController < ApplicationController
|
|||
|
||||
# fallback for standard requests
|
||||
if @saved
|
||||
flash["warning"] = 'Successfully deleted next action'
|
||||
flash["notice"] = 'Successfully deleted next action'
|
||||
redirect_to :action => 'list'
|
||||
else
|
||||
render :action => 'list'
|
||||
|
|
|
|||
|
|
@ -7,15 +7,12 @@ module TodoHelper
|
|||
end
|
||||
|
||||
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"
|
||||
form_id = "checkbox-#{item.id}-form"
|
||||
item_container_id = "item-#{item.id}-container"
|
||||
|
||||
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 << visual_effect( :fade, "#{item_container_id}-fading",
|
||||
|
|
@ -43,7 +40,8 @@ module TodoHelper
|
|||
|
||||
def link_to_remote_todo( item, handled_by)
|
||||
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"
|
||||
if !item.done?
|
||||
str << link_to_remote( image_tag("blank", :title =>"Edit action", :class=>"edit_item", :id=>"action-#{item.id}-edit-icon"),
|
||||
|
|
|
|||
|
|
@ -1,7 +1,5 @@
|
|||
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 => 2.0
|
||||
page.remove "item-#{@item.id}-container"
|
||||
page.visual_effect :fade, "item-#{@item.id}-container", :duration => 0.4
|
||||
page.replace_html "badge_count", @down_count
|
||||
if @down_count == "0"
|
||||
page.show 'empty-nd'
|
||||
|
|
|
|||
|
|
@ -1,5 +1,10 @@
|
|||
<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 => "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 "shared/sidebar" %>
|
||||
</div><!-- End of input box -->
|
||||
|
||||
<% if @flash["warning"] %>
|
||||
<div id="warning_box" class="warning"><%= @flash["warning"] %></div>
|
||||
<% end %>
|
||||
</div><!-- End of input box -->
|
||||
|
|
@ -7,11 +7,6 @@
|
|||
|
||||
</head>
|
||||
<body>
|
||||
<div id="navcontainer">
|
||||
<ul id="navlist">
|
||||
<li><%= link_to "Home", :controller => "todo", :action=>"list"%></li>
|
||||
</ul>
|
||||
</div>
|
||||
|
||||
<%= @content_for_layout %>
|
||||
|
||||
|
|
|
|||
|
|
@ -34,7 +34,7 @@
|
|||
<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','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 "Logout (#{@session['user']['login']}) »", :controller => "login", :action=>"logout"%></li>
|
||||
</ul>
|
||||
|
|
|
|||
1
tracks/app/views/login/_redirect_to_login.rjs
Normal file
1
tracks/app/views/login/_redirect_to_login.rjs
Normal file
|
|
@ -0,0 +1 @@
|
|||
page.redirect_to :controller => 'login', :action => 'login'
|
||||
|
|
@ -1,21 +1,29 @@
|
|||
<%= start_form_tag :action=> "login" %>
|
||||
|
||||
<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>
|
||||
|
||||
<% if @message %>
|
||||
<div id="message"><%= @message %></div>
|
||||
<% end %>
|
||||
|
||||
<label for="user_login">Login: </label>
|
||||
<input type="text" name="user_login" id="user_login" size="20" value=""/><br/>
|
||||
|
||||
<label for="user_password">Password:</label>
|
||||
<input type="password" name="user_password" id="user_password" size="20"/>
|
||||
|
||||
<br/>
|
||||
<input type="submit" name="login" value="Login »" class="primary" />
|
||||
|
||||
<table>
|
||||
<tr>
|
||||
<td><label for="user_login">Login:</label></td>
|
||||
<td><input type="text" name="user_login" id="user_login" size="20" value=""/></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td><label for="user_password">Password:</label></td>
|
||||
<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 »" class="primary" /></td>
|
||||
</tr>
|
||||
</table>
|
||||
</div>
|
||||
|
||||
<%= end_form_tag %>
|
||||
|
|
|
|||
|
|
@ -1,10 +0,0 @@
|
|||
|
||||
<div class="memo">
|
||||
<h3>Logoff</h3>
|
||||
|
||||
<p>You are now logged out of the system...</p>
|
||||
|
||||
<%= link_to "« login", :action=>"login"%>
|
||||
|
||||
</div>
|
||||
|
||||
|
|
@ -3,22 +3,33 @@
|
|||
|
||||
<%= error_messages_for 'user' %><br/>
|
||||
|
||||
<% if @flash["notice"] %><div id="notice"><%= @flash["notice"] %></div><% end %>
|
||||
|
||||
<h3><%= @page_title -%></h3>
|
||||
|
||||
<label for="user_login">Desired login:</label><br/>
|
||||
<%= text_field "user", "login", :size => 20 %><br/>
|
||||
|
||||
<label for="user_password">Choose password:</label><br/>
|
||||
<%= password_field "user", "password", :size => 20 %><br/>
|
||||
|
||||
<label for="user_password_confirmation">Confirm password:</label><br/>
|
||||
<%= password_field "user", "password_confirmation", :size => 20 %><br/>
|
||||
|
||||
<label for="user_word">Secret word (different to password):</label><br />
|
||||
<%= password_field "user", "word", :size => 20 %><br />
|
||||
|
||||
<input type="submit" value="Signup »" class="primary" />
|
||||
|
||||
<table>
|
||||
<tr>
|
||||
<td><label for="user_login">Desired login:</label></td>
|
||||
<td> <%= text_field "user", "login", :size => 20 %></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td><label for="user_password">Choose password:</label></td>
|
||||
<td><%= password_field "user", "password", :size => 20 %></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td><label for="user_password_confirmation">Confirm password:</label></td>
|
||||
<td><%= password_field "user", "password_confirmation", :size => 20 %></td>
|
||||
</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 »" class="primary" /></td>
|
||||
</tr>
|
||||
</table>
|
||||
|
||||
<%= end_form_tag %>
|
||||
</div>
|
||||
|
||||
|
|
|
|||
|
|
@ -1,7 +1,5 @@
|
|||
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 => 2.0
|
||||
page.remove "item-#{@item.id}-container"
|
||||
page.visual_effect :fade, "item-#{@item.id}-container", :duration => 0.4
|
||||
page.replace_html "badge_count", @down_count
|
||||
if @down_count == "0"
|
||||
page.show 'empty-nd'
|
||||
|
|
|
|||
|
|
@ -1,5 +1,10 @@
|
|||
<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 => "todo/completed", :locals => { :done => @done, :collapsible => false, :append_descriptor => "in this project" } %>
|
||||
|
||||
|
|
@ -42,6 +47,3 @@
|
|||
<%= render "shared/_add_new_item_form" %>
|
||||
<%= render "shared/sidebar" %>
|
||||
</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 %>
|
||||
|
|
|
|||
|
|
@ -1,7 +1,5 @@
|
|||
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 => 2.0
|
||||
page.remove "item-#{@item.id}-container"
|
||||
page.visual_effect :fade, "item-#{@item.id}-container", :duration => 0.4
|
||||
page.replace_html "badge_count", @down_count
|
||||
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")
|
||||
|
|
|
|||
|
|
@ -1,4 +1,10 @@
|
|||
<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,
|
||||
:locals => { :collapsible => true } %>
|
||||
<%= render :partial => "todo/completed",
|
||||
|
|
@ -8,9 +14,4 @@
|
|||
<div id="input_box">
|
||||
<%= render :partial => "shared/add_new_item_form", :locals => {:hide_link => false, :msg => ""} %>
|
||||
<%= render "shared/sidebar" %>
|
||||
</div><!-- End of input box -->
|
||||
|
||||
<div class="status-box" id="confirmation-box"></div>
|
||||
<% if @flash["warning"] -%>
|
||||
<div class="warning"><%= @flash["warning"] %></div>
|
||||
<% end -%>
|
||||
</div><!-- End of input box -->
|
||||
|
|
@ -50,5 +50,6 @@ end
|
|||
|
||||
# Include your application configuration below
|
||||
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
|
||||
49
tracks/db/schema.rb
Normal file
49
tracks/db/schema.rb
Normal 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
|
||||
|
|
@ -65,7 +65,11 @@ module LoginSystem
|
|||
# example use :
|
||||
# a popup window might just close itself for instance
|
||||
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
|
||||
|
||||
# store current uri in the session.
|
||||
|
|
|
|||
BIN
tracks/public/images/feed-icon.png
Executable file
BIN
tracks/public/images/feed-icon.png
Executable file
Binary file not shown.
|
After Width: | Height: | Size: 764 B |
|
|
@ -33,15 +33,6 @@ function addOneAjaxToDoItemCheckmarkHandling(elem)
|
|||
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()
|
||||
{
|
||||
return document.getElementsByClassName('container')[0];
|
||||
|
|
@ -69,9 +60,9 @@ function toggleTodoItemChecked()
|
|||
asynchronous:true,
|
||||
evalScripts:true,
|
||||
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); },
|
||||
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)
|
||||
});
|
||||
return false;
|
||||
|
|
@ -85,6 +76,15 @@ function fadeAndRemoveItem(itemContainerElemId)
|
|||
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()
|
||||
{
|
||||
var itemsElem = findItemsElem(this);
|
||||
|
|
|
|||
|
|
@ -8,12 +8,20 @@ body, ol, ul, td {
|
|||
}
|
||||
|
||||
p {
|
||||
background: #ff9;
|
||||
background: #eee;
|
||||
}
|
||||
|
||||
a { color: #f00; padding: 3px; }
|
||||
a:visited { color: #f00; }
|
||||
a:hover { color: #000; background-color: #f00; }
|
||||
a, a:link, a:active, a:visited {
|
||||
color: #cc3334;
|
||||
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 { font-size: 28px }
|
||||
|
|
@ -28,6 +36,8 @@ pre {
|
|||
font-size: 11px;
|
||||
}
|
||||
|
||||
td {background-color: #ff9;}
|
||||
|
||||
#scaffold-main {
|
||||
width: 80%;
|
||||
margin: 10px auto;
|
||||
|
|
@ -35,7 +45,7 @@ pre {
|
|||
}
|
||||
|
||||
div.form {
|
||||
width: 25%;
|
||||
width: 30%;
|
||||
margin: 100px auto;
|
||||
padding: 10px;
|
||||
border: 1px solid #999;
|
||||
|
|
@ -50,6 +60,21 @@ div.memo {
|
|||
background: #ff9;
|
||||
}
|
||||
|
||||
.memo p {
|
||||
background: #ff9;
|
||||
}
|
||||
#notice {
|
||||
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;
|
||||
}
|
||||
|
|
@ -23,8 +23,7 @@ a, a:link, a:active, a:visited {
|
|||
a:hover {
|
||||
color: #fff;
|
||||
background-color: #cc3334;
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
/* Rules for the icon links */
|
||||
|
||||
|
|
@ -132,24 +131,6 @@ a.show_notes:hover {background-image: url(../images/notes_on.png); background-re
|
|||
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 {
|
||||
color: #666;
|
||||
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;}
|
||||
|
||||
/* The alert box notifications */
|
||||
#notice {
|
||||
padding: 2px;
|
||||
border: 1px solid #007E00;
|
||||
background-color: #c2ffc2;
|
||||
color: #007E00;
|
||||
margin-bottom: 15px;
|
||||
text-align: center;
|
||||
}
|
||||
|
||||
.confirmation {
|
||||
border: 1px solid #007E00;
|
||||
background-color: #c2ffc2;
|
||||
|
|
@ -279,11 +269,13 @@ a.footer_link:hover {color: #fff; background-color: #cc3334 !important;}
|
|||
text-align: center;
|
||||
}
|
||||
|
||||
.warning {
|
||||
#warning {
|
||||
padding: 2px;
|
||||
border: 1px solid #ED2E38;
|
||||
background-color: #F6979C;
|
||||
color: #ED2E38;
|
||||
text-align: left;
|
||||
margin-bottom: 15px;
|
||||
text-align: center;
|
||||
}
|
||||
|
||||
.project_completed {
|
||||
|
|
@ -554,4 +546,4 @@ div.message {
|
|||
list-style: square;
|
||||
}
|
||||
|
||||
ul.warning { list-style-type: circle; font-size: 1em; }
|
||||
ul.warning { list-style-type: circle; font-size: 1em; }
|
||||
Loading…
Add table
Add a link
Reference in a new issue