Commit graph

2482 commits

Author SHA1 Message Date
lukemelia
bde8a0bde0 Introduce selenium tests to help get the ajax interactions correct and maintainable.
Start to improve the ajax interactions around the new deferred actions section on the project detail page
Add a README for developers describing how to run the selenium tests.


git-svn-id: http://www.rousette.org.uk/svn/tracks-repos/trunk@387 a4c988fc-2ded-0310-b66e-134b36920a42
2007-01-02 00:19:57 +00:00
bsag
71df0f1061 The last changes to the stylesheet (to improve things for IE 7), made the date overlap the navigation bar in Safari. I've made some changes that I hope (but can't test!) might make it acceptable for both.
Peter Smith suggested added a clear:both directive to div.item-container to sort out the annoying 'stepped actions' effect on IE 7.

I really need a MacBook and a copy of Parallels...



git-svn-id: http://www.rousette.org.uk/svn/tracks-repos/trunk@386 a4c988fc-2ded-0310-b66e-134b36920a42
2007-01-01 18:16:58 +00:00
lukemelia
6e5b574406 First step in adding deferred section to the project detail page. Ajax needs a lot of work on this page.
git-svn-id: http://www.rousette.org.uk/svn/tracks-repos/trunk@385 a4c988fc-2ded-0310-b66e-134b36920a42
2006-12-30 09:52:39 +00:00
lukemelia
a65e66168c Consolidate list and index actions in project and context controllers.
Use simply_helpful methods to simplify DOM IDs.
Improve CSS rendering on IE7. (didn't get to test these changes on Safari!)
Make new contexts appear automatically when added with new action on home page.


git-svn-id: http://www.rousette.org.uk/svn/tracks-repos/trunk@384 a4c988fc-2ded-0310-b66e-134b36920a42
2006-12-30 08:51:49 +00:00
lukemelia
c407fc2463 On first run, tracks now automatically redirects to signup page to create the admin user.
git-svn-id: http://www.rousette.org.uk/svn/tracks-repos/trunk@383 a4c988fc-2ded-0310-b66e-134b36920a42
2006-12-29 17:48:47 +00:00
lukemelia
d44d90761f Fix todo/destroy.rjs so that a context will be removed from the homepage if the last todo in it is deleted
git-svn-id: http://www.rousette.org.uk/svn/tracks-repos/trunk@382 a4c988fc-2ded-0310-b66e-134b36920a42
2006-12-29 08:22:48 +00:00
bsag
39b8cc763b Removed the defunct 'date_preview' stuff, because accidental typing of characters in the date box was leading to spurious Server error warning appearing, which was confusing and annoying.
git-svn-id: http://www.rousette.org.uk/svn/tracks-repos/trunk@381 a4c988fc-2ded-0310-b66e-134b36920a42
2006-12-24 16:30:36 +00:00
bsag
4a97b39928 Because of a typo in project.rb, updating an existing project from completed to either hidden or active was broken. Fixes #418.
Also removed signup route because this is now accomplished via the admin controller.

git-svn-id: http://www.rousette.org.uk/svn/tracks-repos/trunk@380 a4c988fc-2ded-0310-b66e-134b36920a42
2006-12-24 12:32:06 +00:00
lukemelia
c719eeb146 the tickler notification message was not getting shown when the periodical execute activated an action. Fixed.
git-svn-id: http://www.rousette.org.uk/svn/tracks-repos/trunk@379 a4c988fc-2ded-0310-b66e-134b36920a42
2006-12-17 08:35:54 +00:00
lukemelia
dd54b925a9 Clean up logic that checks to see if a user is an admin.
git-svn-id: http://www.rousette.org.uk/svn/tracks-repos/trunk@378 a4c988fc-2ded-0310-b66e-134b36920a42
2006-12-17 08:24:47 +00:00
lukemelia
0e6c6f9f77 * Some refactoring that makes todo_controller a little skinnier by making the user model a little fatter: Introduce new has_many relationships for completed_todos and deferred_todos and include Association Extensions to support their use. Update TodoController to use these new relationships.
* Remove the the app/views/feed/index.rhtml which has been previously moved to app/views/feedlist/index.rhtml



git-svn-id: http://www.rousette.org.uk/svn/tracks-repos/trunk@377 a4c988fc-2ded-0310-b66e-134b36920a42
2006-12-17 08:07:52 +00:00
lukemelia
1d22f08670 Divide UserController into a UserController and a PreferencesController. Divide FeedController into a FeedController and a FeedlistController. Pull up layout and login filter into ApplicationController and override as needed. Ignored new tmp directories.
git-svn-id: http://www.rousette.org.uk/svn/tracks-repos/trunk@376 a4c988fc-2ded-0310-b66e-134b36920a42
2006-12-13 08:31:48 +00:00
lukemelia
1e4f462f21 Fix problems with feeds not working reported on mailing list.
git-svn-id: http://www.rousette.org.uk/svn/tracks-repos/trunk@375 a4c988fc-2ded-0310-b66e-134b36920a42
2006-12-12 17:35:08 +00:00
lukemelia
df6e82186c My changeset had a bug that broke feeds. This should fix them.
git-svn-id: http://www.rousette.org.uk/svn/tracks-repos/trunk@374 a4c988fc-2ded-0310-b66e-134b36920a42
2006-12-11 11:13:37 +00:00
lukemelia
aa41974d4c * Made links work for project and context links that contain an underscore('_') or a dot('.'). I removed urlize() and deurlize() in favor or methods on the models mixed in by the new UrlFriendlyName module.
* Removed tag_object() from application_helper as it was not being used.
* Introduced link_to_context() and link_to_project() helper methods.
* Fixed a javascript syntax error on the context page.



git-svn-id: http://www.rousette.org.uk/svn/tracks-repos/trunk@373 a4c988fc-2ded-0310-b66e-134b36920a42
2006-12-11 04:48:56 +00:00
lukemelia
ee121e3dfb Adjust the tab order of the edit action form so it doesn't overlap with the tab order of the add action form.
git-svn-id: http://www.rousette.org.uk/svn/tracks-repos/trunk@372 a4c988fc-2ded-0310-b66e-134b36920a42
2006-12-10 22:43:24 +00:00
bsag
26c7a1e6f1 Created an admin controller that allows the admin user (only) to view the users on the system and destroy and signup new users. Destroying a user deletes all of their actions, contexts, projects and notes.
The link to the admin page only appears when an admin user is logged in, and the signup link is now on the admin page, rather than appearing in the mini-links at the top of the page.

The page also lists some statistics associated with each user (the number of actions, contexts, projects etc. each user has).

git-svn-id: http://www.rousette.org.uk/svn/tracks-repos/trunk@371 a4c988fc-2ded-0310-b66e-134b36920a42
2006-12-10 19:30:19 +00:00
lukemelia
74ad2b9cc7 Forgot to check this one in!
git-svn-id: http://www.rousette.org.uk/svn/tracks-repos/trunk@370 a4c988fc-2ded-0310-b66e-134b36920a42
2006-12-09 17:39:42 +00:00
lukemelia
c099160411 The last changeset had a dependency on the simply_helpful plugin, but I forgot to add it. Here it is.
git-svn-id: http://www.rousette.org.uk/svn/tracks-repos/trunk@369 a4c988fc-2ded-0310-b66e-134b36920a42
2006-12-09 07:38:43 +00:00
lukemelia
e43c5b727a Replace external toggle_notes.js with inline link_to_function.
Cleanup sidebar views and markup
Minor cleanup to make html more valid. 



git-svn-id: http://www.rousette.org.uk/svn/tracks-repos/trunk@368 a4c988fc-2ded-0310-b66e-134b36920a42
2006-12-09 07:10:55 +00:00
lukemelia
a2b660bd77 Shaped up the print stylesheet. It now validates, hides edit/delete images, sizes checkboxes appropriately, displays dotted borders under h2 elements, and puts each Todo's descriptions on the same line as its checkbox. Made the formatting more consistent, too.
git-svn-id: http://www.rousette.org.uk/svn/tracks-repos/trunk@367 a4c988fc-2ded-0310-b66e-134b36920a42
2006-12-09 04:38:20 +00:00
lukemelia
7cf9cbf62b Restored some inadvertently commented tests. Also, I forgot to mention that the last changeset also removed lightbox.js and lightbox.css. I noticed they were adding to total page size unnecessarily as they are not used.
git-svn-id: http://www.rousette.org.uk/svn/tracks-repos/trunk@366 a4c988fc-2ded-0310-b66e-134b36920a42
2006-12-08 07:56:21 +00:00
lukemelia
d7bb7555a0 Upgraded to Rails version to 1-2-pre-release branch revision 5704. Lots of stuff is deprecated in Rails 1.2, so this changeset
also removes deprecated methods. All tests pass (at least on my machine!) and raise no deprecation warnings.



git-svn-id: http://www.rousette.org.uk/svn/tracks-repos/trunk@365 a4c988fc-2ded-0310-b66e-134b36920a42
2006-12-08 07:41:20 +00:00
lukemelia
baf649e143 Remove rails dir in to prepare for upgrading to 1-2-pre-release
git-svn-id: http://www.rousette.org.uk/svn/tracks-repos/trunk@364 a4c988fc-2ded-0310-b66e-134b36920a42
2006-12-08 07:25:43 +00:00
bsag
9c37b40f3d Gathered up calls to init and init_todos in before_filters, as suggested by <a href="http://www.therailsway.com/2006/11/16/tracks-part-2">Part 2</a> of the RailsWay article series.
There are a couple of test errors that I can't seem to fix. 

git-svn-id: http://www.rousette.org.uk/svn/tracks-repos/trunk@363 a4c988fc-2ded-0310-b66e-134b36920a42
2006-11-26 12:13:48 +00:00
lukemelia
ad6616d161 Todo validation messages are now hidden after a successful submit.
git-svn-id: http://www.rousette.org.uk/svn/tracks-repos/trunk@362 a4c988fc-2ded-0310-b66e-134b36920a42
2006-11-22 06:08:34 +00:00
lukemelia
4a944fe7c1 Fixed a boolean test that was wrong in the last two changesets.
git-svn-id: http://www.rousette.org.uk/svn/tracks-repos/trunk@361 a4c988fc-2ded-0310-b66e-134b36920a42
2006-11-21 06:59:36 +00:00
lukemelia
731adedf98 Doh. Missed an important question mark in the last commit.
git-svn-id: http://www.rousette.org.uk/svn/tracks-repos/trunk@360 a4c988fc-2ded-0310-b66e-134b36920a42
2006-11-21 06:50:28 +00:00
lukemelia
d57b313376 Enable converting active actions to deferred actions and vice versa by editing the show_from date. Fixes #396.
git-svn-id: http://www.rousette.org.uk/svn/tracks-repos/trunk@359 a4c988fc-2ded-0310-b66e-134b36920a42
2006-11-21 06:34:32 +00:00
lukemelia
85486a6233 Fixes #403 "When prefs are set to date formats other than %m-%d-%y, database errors are produced on save."
This bug was due to the Chronic library integration, which I commented out for now.

In its youthful state, Chronic has a U.S.-centered worldview with only limited support for non-U.S. date formats. In particular, its tests show that it can support parsing 5/27/1979 and 27/5/1979 but are silent on the more challenging case of 12/11/2006 or 11/12/2006. I see no way to configure the plugin with date format. Without that, all users would have to use the (admittedly awkward) U.S. date format.

Maybe we could prefer a successful format-respecting date parse and fall back to a Chronic parse?

I also updated the "action due"" text on deferred items to use the user's date format.



git-svn-id: http://www.rousette.org.uk/svn/tracks-repos/trunk@358 a4c988fc-2ded-0310-b66e-134b36920a42
2006-11-21 06:04:39 +00:00
lukemelia
fd67a7341e Fixes #404. "Create a new deferred todo in the tickler go to due field. The calendar is shown go to the 'show from' field. The calendar is not shown" The problem was a javascript error from the partially disabled keyboard shortcuts in the calendar. They are now totally disabled until we work out the Chronic parsing stuff.
git-svn-id: http://www.rousette.org.uk/svn/tracks-repos/trunk@357 a4c988fc-2ded-0310-b66e-134b36920a42
2006-11-21 05:10:32 +00:00
lukemelia
b243e0d393 * After project or context was edited in listing page, it could not be dragged. This is now fixed.
* Added in-place editing of to project and context detail pages



git-svn-id: http://www.rousette.org.uk/svn/tracks-repos/trunk@356 a4c988fc-2ded-0310-b66e-134b36920a42
2006-11-21 04:54:07 +00:00
lukemelia
e96d91c5c0 Fixes #402. "The AutoCompleter? for the project field does not work when adding a new Next Action if any of your Project names have an apostrophe in them. (Like a project named "Steve's bike")."
git-svn-id: http://www.rousette.org.uk/svn/tracks-repos/trunk@355 a4c988fc-2ded-0310-b66e-134b36920a42
2006-11-20 12:40:04 +00:00
lukemelia
7cc9f27cc3 Remove files that are no longer used by Tracks.
git-svn-id: http://www.rousette.org.uk/svn/tracks-repos/trunk@354 a4c988fc-2ded-0310-b66e-134b36920a42
2006-11-20 12:35:28 +00:00
lukemelia
6ed264c198 Fixes #401. "When adding a Project on the projects page, the form is submitted and Project added, but the page does not update to show the new Project (a manual refresh is needed)."
git-svn-id: http://www.rousette.org.uk/svn/tracks-repos/trunk@353 a4c988fc-2ded-0310-b66e-134b36920a42
2006-11-20 12:28:55 +00:00
lukemelia
bb1cfe613a * Replaced select widgets with AutoCompleters for project & context in new item and edit forms. You can now create a new project and/or context on the fly as you're adding an item.
* Rolled Deferred controller, views & helper into Todo.
* Made the show_from field always available on the add new item and edit forms.
* Added validation to Todo to make sure a context is specified.
* Set initial state of Todo to :deferred when show_from is specified (I still need to make handle setting show_from during an edit).
* Created a generic rescue_action in ApplicationController and removed boilerplate rescue code from a few actions in TodoController.
* Made all Todo creation requests use the TodoController, removing duplicate logic from ContextController and ContextController
* Removed unused lightbox-style add item form
* Remove unused update_context and update_project actions
* Updated rails javascripts to the same as our vendor/rails



git-svn-id: http://www.rousette.org.uk/svn/tracks-repos/trunk@352 a4c988fc-2ded-0310-b66e-134b36920a42
2006-11-20 04:31:00 +00:00
bsag
5d51ca84ba Rationalised and streamlined the flash and error notifications, using a method outlined here by Andreas Aderhold:
http://blog.andreasaderhold.com/2006/07/rails-notifications

All flash messages now show up as an overlay on the right hand side of the navigation header, and also fade automatically, so that you don't have to refresh the page. Errors (i.e. validation errors) are shown as close to the originating form as possible.

Two new notify methods (one for controllers, and one for RJS templates) help construct the flash of whatever type you like. e.g.

In controllers:

notify :warning, "This is the message"

In RJS:

notify :warning, "This is the message", 5.0



git-svn-id: http://www.rousette.org.uk/svn/tracks-repos/trunk@351 a4c988fc-2ded-0310-b66e-134b36920a42
2006-11-19 16:52:58 +00:00
lukemelia
fed0daa96d Complete the transition of acts_as_todo_container to todo_list, a simple module.
git-svn-id: http://www.rousette.org.uk/svn/tracks-repos/trunk@350 a4c988fc-2ded-0310-b66e-134b36920a42
2006-11-18 06:18:17 +00:00
lukemelia
807cb1e759 Working with acts_as_state_machine, it's tricky to create an object with a state other than the one you've defined as the initial state. This caused a bug where deferred actions were not being created with a :deferred state. Fixed this. Fixes #400.
git-svn-id: http://www.rousette.org.uk/svn/tracks-repos/trunk@349 a4c988fc-2ded-0310-b66e-134b36920a42
2006-11-18 05:01:23 +00:00
lukemelia
b9b4330b8d Convert :dependent => true to :dependent => :delete_all on Project and Context, and brought acts_as_todo_container under test in anticipation of conversion to a simple module.
git-svn-id: http://www.rousette.org.uk/svn/tracks-repos/trunk@348 a4c988fc-2ded-0310-b66e-134b36920a42
2006-11-17 14:08:56 +00:00
bsag
1d4c33e21d Tidied up the mobile view.
* Fixed a bug where pages other than the first page in filtered views would generate an error. It turns out to be difficult to paginate the filtered pages without increasing complexity quite a lot, so I'm leaving them unpaginated. By definition, viewing single contexts or projects should involve a much smaller subset than all the active todos.
* Edited actions were getting 'state' set to zero rather than active or completed. Fixed that and made sure that checking the 'done' box completes the action
* Changed some of the names of actions to bring them more in line with the todo_controller (i.e. list -> index, update_action -> update)
* Added functional tests for mobile actions

git-svn-id: http://www.rousette.org.uk/svn/tracks-repos/trunk@347 a4c988fc-2ded-0310-b66e-134b36920a42
2006-11-17 12:44:27 +00:00
lukemelia
78a89ccf3b Refactor acts_as_namepart_finder to a module, as suggested in the review of Tracks on The Rails Way.
http://www.therailsway.com/2006/11/15/tracks-part-1/



git-svn-id: http://www.rousette.org.uk/svn/tracks-repos/trunk@346 a4c988fc-2ded-0310-b66e-134b36920a42
2006-11-16 05:33:25 +00:00
lukemelia
04bd157857 Add a password to fixture's ldap_user. It's unused by the LDAP test, but it was causing some databases to have issues.
Also, because the ldap test requires external integration, it now does not run by default. To make it run set the RUN_TRACKS_LDAP_TESTS environment variable, for example:

  env RUN_TRACKS_LDAP_TESTS=true rake test:integration



git-svn-id: http://www.rousette.org.uk/svn/tracks-repos/trunk@344 a4c988fc-2ded-0310-b66e-134b36920a42
2006-11-15 14:43:12 +00:00
lukemelia
c51587e422 * Converted Todo to acts_as_state_machine. It's states are active, deferred, completed, and project_hidden. This replaces the old single inheritance model of Immediate and Deferred. Also renamed todo.completed to todo.completed_at for clarity
* Consolidated toggle_check handling to todo_controller and rjs  
* Introduced user preference to show/hide hidden projects section in sidebar
* Fixed a bug in parse_date_per_user_prefs that was causing due dates to be set in the todo model as Times and not Dates
* Upgraded ARTS plugin
* This changeset includes migrations, so remember to db:migrate.
* Lots of code changes here, so bug reports will be gratefully accepted!



git-svn-id: http://www.rousette.org.uk/svn/tracks-repos/trunk@343 a4c988fc-2ded-0310-b66e-134b36920a42
2006-11-15 09:05:07 +00:00
lukemelia
883bcb30bb Implement Null Object pattern for Todo.project to save bsag and I some script/console headaches. Thanks to
Craig Ambrose for the "writeup":http://blog.craigambrose.com/articles/2006/09/22/active-record-associations-and-the-null-object-pattern



git-svn-id: http://www.rousette.org.uk/svn/tracks-repos/trunk@342 a4c988fc-2ded-0310-b66e-134b36920a42
2006-11-14 04:37:28 +00:00
bsag
7fb8140129 Fixed adding of actions with due dates from the context and project pages, which I broke with addition of Chronic parsing. Formerly, the record would be saved, but the page would not update using Ajax.
git-svn-id: http://www.rousette.org.uk/svn/tracks-repos/trunk@341 a4c988fc-2ded-0310-b66e-134b36920a42
2006-11-13 12:36:07 +00:00
bsag
838b2d83c2 Applied Luke's patch to init_not_done_counts to exclude actions from hidden projects in the count shown in the sidebar.
git-svn-id: http://www.rousette.org.uk/svn/tracks-repos/trunk@340 a4c988fc-2ded-0310-b66e-134b36920a42
2006-11-13 11:53:27 +00:00
bsag
a4963a9883 Tinkered a bit with the display of actions in hidden projects. It seems to me that hidden projects are ones that are in some sense 'on hold', so you probably don't want actions in those projects displayed on the home page, or on the context pages (though you still want to be able to view that project to evaluate whether it should be made active, and perhaps queue up more actions in it).
Now actions in hidden projects are hidden on the home page and context pages. Hidden projects are also listed separately in the sidebar (this should perhaps be included in the user preference for showing completed projects in the sidebar). The counts in the sidebar for projects and contexts *include* the hidden project actions, because I haven't fixed that yet. Also, excluding the hidden project actions is done in a really clunky way until I can get my head around the new acts_as_todo_container class.

git-svn-id: http://www.rousette.org.uk/svn/tracks-repos/trunk@339 a4c988fc-2ded-0310-b66e-134b36920a42
2006-11-12 19:12:36 +00:00
lukemelia
e957f86cd1 Convert multiline { || ... } blocks into do || ... end for nicer style.
git-svn-id: http://www.rousette.org.uk/svn/tracks-repos/trunk@338 a4c988fc-2ded-0310-b66e-134b36920a42
2006-11-08 06:25:18 +00:00
lukemelia
4caca8db70 Improved reliability of ldap test (somewhat... it's still very environment specific).
Fixed validations in User model.
Updated environment.rb.tmpl to be a little easier to follow.

A note for upgraders. Be sure to include the following line in your environment.rb:

 AUTHENTICATION_SCHEMES = ['database']

See environment.rb.tmpl for details



git-svn-id: http://www.rousette.org.uk/svn/tracks-repos/trunk@337 a4c988fc-2ded-0310-b66e-134b36920a42
2006-11-06 07:32:48 +00:00