mirror of
https://github.com/TracksApp/tracks.git
synced 2026-03-10 14:42:35 +01:00
Implemented a feature that give a project and optional default context. When set,
this context will be pre-populated when creating an action from the project's page. When creating an action from the home page, the context will be auto-selected when the project is selected if the context field has not yet been entered. This implementation is a combination of the great patch submitted by James Kebinger (thanks James!) and some of my modifications and additions. Don't forget to rake db:migrate. Fixes #162, originally suggested by Rolf one year ago! Also in this commit: * Tweaked selenium tags test * Tweaked formatting of next/previous project HTML * Implemented Null Object pattern for context to support a Project having no default context * Removed tickler.rhtml, no longer in use * applying z-index values to project sortable list items (otherwise context autocomplete was appearing below next list item) * Swapped order of project and context in new action form (setting default context makes more sense this way) * Removed CSS width of for form elements, so form could be used in content area without being too narrow git-svn-id: http://www.rousette.org.uk/svn/tracks-repos/trunk@480 a4c988fc-2ded-0310-b66e-134b36920a42
This commit is contained in:
parent
11ed78abe2
commit
38b2e336a8
21 changed files with 189 additions and 75 deletions
|
|
@ -1,6 +1,5 @@
|
|||
setup :fixtures => :all
|
||||
include_partial 'login/login', :username => 'admin', :password => 'abracadabra'
|
||||
open "/todos/tag/foo"
|
||||
wait_for_element_present "xpath=//div[@id='t'] //h2"
|
||||
assert_not_visible "t_empty-nd"
|
||||
wait_for_element_present "xpath=//div[@id='c1'] //h2"
|
||||
wait_for_text 'badge_count', '2'
|
||||
|
|
@ -192,5 +192,12 @@ class ProjectTest < Test::Unit::TestCase
|
|||
@moremoney.todos[0].complete!
|
||||
assert_equal 2, @moremoney.not_done_todo_count
|
||||
end
|
||||
|
||||
def test_default_context_name
|
||||
p = Project.new
|
||||
assert_equal '', p.default_context.name
|
||||
p.default_context = contexts(:agenda)
|
||||
assert_equal 'agenda', p.default_context.name
|
||||
end
|
||||
|
||||
end
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue