Commit graph

4262 commits

Author SHA1 Message Date
lukemelia
dc73835c7b Fix the Ajax corner case described in #353 : "change of todo's context on home page should work like marking complete"
git-svn-id: http://www.rousette.org.uk/svn/tracks-repos/trunk@316 a4c988fc-2ded-0310-b66e-134b36920a42
2006-08-25 03:57:26 +00:00
lukemelia
c0b0e14b9e Applied a variation of the patch submitted with #367 by a nameless contrbutor (thanks, whoever you are!). This should bring our iCal feeds more in line with the spec (RFC 2445) and make them work better with Evolution and perhaps other iCal consumers.
git-svn-id: http://www.rousette.org.uk/svn/tracks-repos/trunk@315 a4c988fc-2ded-0310-b66e-134b36920a42
2006-08-25 03:36:44 +00:00
lukemelia
3002fcf2f1 Created tests for backend_controller to cover security concerns, including #372 "user can add an action to another user's context via API". Modified backend_controller to close that hole and make the tests pass.
Added UserController#create to provide RESTful API for the admin user to create a new user in the system. This may be useful for the folks who have generously opened their Tracks installs to others. I have plans to document the RESTful API stuff at some point and write a Ruby wrapper.

Created a class method User.get_salt that wraps all calls to the SALT constant so that unit-tests can be always run with the default salt (I was previously needing to modify my environment.rb to run tests). 

Replaced usages of assert_success in tests with assert_response :success because assert_success is deprecated.



git-svn-id: http://www.rousette.org.uk/svn/tracks-repos/trunk@313 a4c988fc-2ded-0310-b66e-134b36920a42
2006-08-25 02:25:18 +00:00
lukemelia
14c8516002 In a session-expired scenario that results from a call to tickler/check_tickler, Tracks will redirect to tickler/check_tickler after the user re-authenticates. That action only has an rjs view, so the result was a blank page. In that situation check_tickler will now trigger a redirect to the Tracks home page.
git-svn-id: http://www.rousette.org.uk/svn/tracks-repos/trunk@312 a4c988fc-2ded-0310-b66e-134b36920a42
2006-08-17 02:06:07 +00:00
lukemelia
994308f581 Actions listed in TEXT feeds are now sorted in the same order as they are on the home page. Also fixed a bug where an action marked complete and then unmarked complete would be shown as complete on the TEXT feed. This addresses Jeroen van der Ham's mailing list query. Create a Trac ticket next time please, Jeroen. :-)
git-svn-id: http://www.rousette.org.uk/svn/tracks-repos/trunk@311 a4c988fc-2ded-0310-b66e-134b36920a42
2006-08-14 06:37:53 +00:00
lukemelia
a1c199131b Fixes #335. A user's token (or "word") that is used for feed and some API access will now not change unless explicity requested by the user.
git-svn-id: http://www.rousette.org.uk/svn/tracks-repos/trunk@310 a4c988fc-2ded-0310-b66e-134b36920a42
2006-08-13 04:43:52 +00:00
lukemelia
31214f1812 Refine todo update.rjs to work better when called from a project page. Fixes #354.
git-svn-id: http://www.rousette.org.uk/svn/tracks-repos/trunk@309 a4c988fc-2ded-0310-b66e-134b36920a42
2006-08-11 05:36:48 +00:00
lukemelia
03f4de5703 Upgrade to rails 1.1.6.
Clean up a couple of minor errors/warnings.



git-svn-id: http://www.rousette.org.uk/svn/tracks-repos/trunk@307 a4c988fc-2ded-0310-b66e-134b36920a42
2006-08-11 02:53:59 +00:00
lukemelia
a36b736c6a Freeze to rails 1.1.5. The only change I needed to make for compatibility was to ApplicationController#init_not_done_counts
git-svn-id: http://www.rousette.org.uk/svn/tracks-repos/trunk@306 a4c988fc-2ded-0310-b66e-134b36920a42
2006-08-10 03:22:47 +00:00
lukemelia
45739e12de Remove unused method (TodoController@count_shown_items), refactoring todo_controller for DRY
git-svn-id: http://www.rousette.org.uk/svn/tracks-repos/trunk@305 a4c988fc-2ded-0310-b66e-134b36920a42
2006-08-08 23:38:42 +00:00
lukemelia
9158c4341c A slight modification to my last refactor: using singleton methods instead of a mix-in.
git-svn-id: http://www.rousette.org.uk/svn/tracks-repos/trunk@304 a4c988fc-2ded-0310-b66e-134b36920a42
2006-08-04 22:20:08 +00:00
lukemelia
c290d7a36a Some cool refactoring of the completed and completed_archive actions.
git-svn-id: http://www.rousette.org.uk/svn/tracks-repos/trunk@303 a4c988fc-2ded-0310-b66e-134b36920a42
2006-08-03 01:58:49 +00:00
lukemelia
f9a2a6460d Apply Ryan Daigle's patch to fix editing contexts and projects. See #341. Does not resolve ajax loading issue mentioned in the ticket.
git-svn-id: http://www.rousette.org.uk/svn/tracks-repos/trunk@302 a4c988fc-2ded-0310-b66e-134b36920a42
2006-08-03 01:07:13 +00:00
lukemelia
cf7b90101a Convert edit action to use RJS; share edit views between deferred and todo controllers; rename update_action to update in todo controller. Another step in the process of making Tracks more CRUDdy!
git-svn-id: http://www.rousette.org.uk/svn/tracks-repos/trunk@301 a4c988fc-2ded-0310-b66e-134b36920a42
2006-08-02 03:40:22 +00:00
lukemelia
9392d4d696 Unify controller action for destroying an action into the todo controller and lay some groundwork for similar requests coming from different views. Fixes #343.
git-svn-id: http://www.rousette.org.uk/svn/tracks-repos/trunk@300 a4c988fc-2ded-0310-b66e-134b36920a42
2006-08-01 07:03:31 +00:00
lukemelia
1f6a99a27f Fix project and context creation rendering, which was failing because the hash for tracking the number of actions in a project or context had not been defined. Fixes #341.
git-svn-id: http://www.rousette.org.uk/svn/tracks-repos/trunk@299 a4c988fc-2ded-0310-b66e-134b36920a42
2006-07-30 20:09:04 +00:00
lukemelia
d9e3c94a17 Apply Tommi Komulainen's patch to expands the action in-place editing form to use the available width more effectively. Thanks Tommi!
Fixes #334.
  


git-svn-id: http://www.rousette.org.uk/svn/tracks-repos/trunk@298 a4c988fc-2ded-0310-b66e-134b36920a42
2006-07-30 03:37:57 +00:00
lukemelia
ee85dea17c Applied dstrelau's patch to fix a bonehead move on my part that left a single line of an older version of code in deferred_controller. Fixes #340
git-svn-id: http://www.rousette.org.uk/svn/tracks-repos/trunk@297 a4c988fc-2ded-0310-b66e-134b36920a42
2006-07-30 02:19:14 +00:00
lukemelia
7cf219afb9 Fix context and project list feeds, which were broken in one of the last two changesets.
git-svn-id: http://www.rousette.org.uk/svn/tracks-repos/trunk@296 a4c988fc-2ded-0310-b66e-134b36920a42
2006-07-29 10:26:57 +00:00
lukemelia
c606e646b3 Incorporate Ryan Daigle's patch (thanks Ryan!) to fix errors parsing non-US-style dates on the tickler show_from field. Refactor date parsing calls to use a new method in the base action controller.
git-svn-id: http://www.rousette.org.uk/svn/tracks-repos/trunk@295 a4c988fc-2ded-0310-b66e-134b36920a42
2006-07-28 19:03:34 +00:00
lukemelia
e0e407d99a Optimized ActiveRecord calls to minimize SQL queries, especially on the home page. Also, moved feed page to feed controller.
git-svn-id: http://www.rousette.org.uk/svn/tracks-repos/trunk@294 a4c988fc-2ded-0310-b66e-134b36920a42
2006-07-28 06:55:35 +00:00
lukemelia
afaf2235fa Clean up todo controller by extracting deferred todo functionality into a new deferred controller. Thanks to Trotter Cashion for his presentation on CRUD at the nyc.rb group that was the inspiration for this cleanup. See http://lifecoding.com/blog/?p=31 for slides.
git-svn-id: http://www.rousette.org.uk/svn/tracks-repos/trunk@293 a4c988fc-2ded-0310-b66e-134b36920a42
2006-07-28 04:09:02 +00:00
bsag
0a00eaffb9 Fixed a boneheaded mistake that I made with the http-equiv refresh directive. Now if you have a value of zero in your user preferences, auto-refresh really is turned off.
git-svn-id: http://www.rousette.org.uk/svn/tracks-repos/trunk@292 a4c988fc-2ded-0310-b66e-134b36920a42
2006-07-23 19:19:10 +00:00
bsag
f483c34429 Added similar code to that in [288] to add context and project dropdowns to all of the lightbox add next action forms.
git-svn-id: http://www.rousette.org.uk/svn/tracks-repos/trunk@291 a4c988fc-2ded-0310-b66e-134b36920a42
2006-07-23 13:42:21 +00:00
bsag
803a9db6ae Added a META HTTP-EQUIV=REFRESH value to the standard layout template. The refresh value is taken from user preferences, and defaults to zero so that the page doesn't refresh automatically.
If you're using the trunk, you'll need to run rake db:migrate to update your user preferences.

Fixes #295



git-svn-id: http://www.rousette.org.uk/svn/tracks-repos/trunk@290 a4c988fc-2ded-0310-b66e-134b36920a42
2006-07-23 13:33:52 +00:00
bsag
d1b74bc2bf Notes with returns in them broke the iCal feed. By looking at how iCal itself encodes notes with returns/linebreaks in them, I figured out that you need a one line string with each line break as a literal '\n', which iCal then interprets as a linebreak.
iCal now accepts feeds containing notes with linebreaks, and properly interprets those linebreaks.

Fixes #319



git-svn-id: http://www.rousette.org.uk/svn/tracks-repos/trunk@289 a4c988fc-2ded-0310-b66e-134b36920a42
2006-07-23 06:36:18 +00:00
bsag
0401763a10 Altered the shared/add_new_item_form to show the context and project drop downs on all the pages (including the show/[context_name] and show/[project_name] pages). On the latter pages, the drop down automatically selects the context or project of the current page.
To my great surprise, it also seems to fix the long-standing problem with Safari silently nullifying the fields after an item was added, and so causing two additions in a row to fail! Yay for unintended side effects!

Fixes #331



git-svn-id: http://www.rousette.org.uk/svn/tracks-repos/trunk@288 a4c988fc-2ded-0310-b66e-134b36920a42
2006-07-22 18:55:57 +00:00
lukemelia
89802e7e19 Make check_tickler's conversion of Deferred actions to Immediate ones bypass validation. Fixes #329
git-svn-id: http://www.rousette.org.uk/svn/tracks-repos/trunk@287 a4c988fc-2ded-0310-b66e-134b36920a42
2006-07-21 03:22:57 +00:00
lukemelia
229ee47743 Add javascript to hide empty notes message upon adding a note on the project detail page. Fixes #327.
git-svn-id: http://www.rousette.org.uk/svn/tracks-repos/trunk@286 a4c988fc-2ded-0310-b66e-134b36920a42
2006-07-20 06:05:41 +00:00
lukemelia
91f272a672 Make contexts appear and disappear on the home page as items are added/deleted/marked complete. Fixes #313.
git-svn-id: http://www.rousette.org.uk/svn/tracks-repos/trunk@285 a4c988fc-2ded-0310-b66e-134b36920a42
2006-07-18 05:09:54 +00:00
bsag
8c7079dba5 Added a feed (RSS and TXT) for the actions completed in the past 7 days, as promised on the home page of the Tracks projects site, but hitherto only implemented in my imagination, and not in reality as I'd somehow assumed ;-)
Fixes #323



git-svn-id: http://www.rousette.org.uk/svn/tracks-repos/trunk@284 a4c988fc-2ded-0310-b66e-134b36920a42
2006-07-17 18:54:12 +00:00
bsag
847c283c5b Modified fixtures files (test/fixtures/*.yml) to use true and false values rather than 1/0 or 't'/'f' or a variable that set either of those appropriately.
Fixes #326. Thanks, Ben!



git-svn-id: http://www.rousette.org.uk/svn/tracks-repos/trunk@283 a4c988fc-2ded-0310-b66e-134b36920a42
2006-07-17 18:01:35 +00:00
lukemelia
1ee651f8bb DRY up code around Immediate and Deferred actions, including controller methods and views
Relocated todo_controller#deferred_update_action to be next to todo_controller#update_action 
Include all non-hidden contexts on the home page, but hide the empty ones. Ground work for supporting the automatic showing of a context with zero items when an item is moved to it.
Added a comment about todo_controller#update_element -- is it used?
Remove unused #list_of method from context, note & project models
Remove unused #list_all method from note model
Methods to lazy load done_todos and not_done_todos for project and context models

Fixes #322



git-svn-id: http://www.rousette.org.uk/svn/tracks-repos/trunk@282 a4c988fc-2ded-0310-b66e-134b36920a42
2006-07-17 03:40:35 +00:00
lukemelia
13f7f443af Major javascript performance improvements.
git-svn-id: http://www.rousette.org.uk/svn/tracks-repos/trunk@281 a4c988fc-2ded-0310-b66e-134b36920a42
2006-07-13 04:50:26 +00:00
lukemelia
ef42421f64 This drag-drop javascript has got the best of me for the time being. I'm removing all drag-drop functionality to eliminate the javascript performance issues from the trunk. If anyone if interested in digging into this further, I'll be attaching a patch containing the code removed here to ticket #220.
git-svn-id: http://www.rousette.org.uk/svn/tracks-repos/trunk@280 a4c988fc-2ded-0310-b66e-134b36920a42
2006-07-12 04:35:32 +00:00
lukemelia
0b188b6e24 Various performance improvements to todo-items javascript, to try to further address #320. As part of this effort, I removed the ability to drag to the sidebar projects and contexts.
git-svn-id: http://www.rousette.org.uk/svn/tracks-repos/trunk@279 a4c988fc-2ded-0310-b66e-134b36920a42
2006-07-11 06:47:55 +00:00
lukemelia
b4891224ec Improve page load performance with by lazy loading Draggables. Thanks to Ryan Gahl for his mailing list post on the subject at http://lists.rubyonrails.org/pipermail/rails-spinoffs/2006-February/002459.html.
git-svn-id: http://www.rousette.org.uk/svn/tracks-repos/trunk@278 a4c988fc-2ded-0310-b66e-134b36920a42
2006-07-08 00:32:57 +00:00
lukemelia
1b5215ed0e Make the cursor change when the mouse is over a draggable area.
git-svn-id: http://www.rousette.org.uk/svn/tracks-repos/trunk@277 a4c988fc-2ded-0310-b66e-134b36920a42
2006-07-03 04:18:29 +00:00
lukemelia
b77f743bee Enabled dropping of actions on projects in the sidebar to ajaxomagically update the project for an action. Needs a little CSS work, but it's functional.
git-svn-id: http://www.rousette.org.uk/svn/tracks-repos/trunk@276 a4c988fc-2ded-0310-b66e-134b36920a42
2006-07-03 00:59:31 +00:00
lukemelia
9263249e77 This changeset adds the ability to drag and drop actions between contexts and ajaxomagically update the action's context in the backend. I've tested it in Firefox and Safari, but not on other browsers.
When you start dragging an action, the other contexts collapse to provide easier targets for dropping. After the drop, the contexts return to their previously states of collapsed/expanded.



git-svn-id: http://www.rousette.org.uk/svn/tracks-repos/trunk@275 a4c988fc-2ded-0310-b66e-134b36920a42
2006-07-03 00:22:28 +00:00
bsag
060f1e9a97 Added links to the new forum and wiki to the 'feedback' links at the bottom of each page within Tracks.
Fixes #314.


git-svn-id: http://www.rousette.org.uk/svn/tracks-repos/trunk@274 a4c988fc-2ded-0310-b66e-134b36920a42
2006-07-02 18:26:28 +00:00
lukemelia
9c7e96e2d3 Collapsing contexts was allowing the link clicked to be processed, and since the href just consists of "#", the page would scroll to the top. This commit fixes that problem.
git-svn-id: http://www.rousette.org.uk/svn/tracks-repos/trunk@273 a4c988fc-2ded-0310-b66e-134b36920a42
2006-06-30 03:27:48 +00:00
lukemelia
7160825d87 A few minor changes to ensure that all calls to ActiveRecord::Base.find do not interpolate variables, preferring conditions for security. There were no holes that I noticed, but it's better to know you don't have to worry with a glance.
git-svn-id: http://www.rousette.org.uk/svn/tracks-repos/trunk@272 a4c988fc-2ded-0310-b66e-134b36920a42
2006-06-30 01:32:29 +00:00
bsag
654409439f At some point, the completed actions listing at the bottom of the home page and the context and project pages had acquired a strange sort order. I've changed it back to sorting by descending completion date, so that the last action completed is at the top.
git-svn-id: http://www.rousette.org.uk/svn/tracks-repos/trunk@271 a4c988fc-2ded-0310-b66e-134b36920a42
2006-06-29 17:38:13 +00:00
bsag
13e2a13ca5 Made some more improvements to the mobile view:
* A count of actions in each situation is shown (i.e. all uncompleted actions on main page, all actions in context on filtered context page etc.)
* Validation errors when adding a new action are now caught and displayed on the form. I can't seem to get validation errors displayed for existing items which are being edited, but the action is (correctly) not saved.
* You can now add deferred actions through the standard form (these are not displayed on the mobile view currently).
* There's a logout link on the main page.



git-svn-id: http://www.rousette.org.uk/svn/tracks-repos/trunk@270 a4c988fc-2ded-0310-b66e-134b36920a42
2006-06-25 17:29:22 +00:00
bsag
822ac881f6 Changed the login form to make the checkbox for session expiry checked by default. So without any intervention, you will get a non-expiring session. This should help those who use an autologin Greasemonkey script in Firefox, as discussed on the mailing list.
git-svn-id: http://www.rousette.org.uk/svn/tracks-repos/trunk@269 a4c988fc-2ded-0310-b66e-134b36920a42
2006-06-24 14:26:33 +00:00
bsag
42bc3d070e Added CSS patch for IE problems provided by checketts in #308.
git-svn-id: http://www.rousette.org.uk/svn/tracks-repos/trunk@268 a4c988fc-2ded-0310-b66e-134b36920a42
2006-06-24 14:13:25 +00:00
bsag
0edb198e39 Fixed a display glitch that affected Opera: the contents of the page would display underneath the fixed navigation section at the top.
git-svn-id: http://www.rousette.org.uk/svn/tracks-repos/trunk@267 a4c988fc-2ded-0310-b66e-134b36920a42
2006-06-24 13:57:31 +00:00
lukemelia
d6ac8086d6 Applied changes to context corresponding to yesterday's project changeset: tests, prohibit slashes, introduce RJS, relocate new context form.
git-svn-id: http://www.rousette.org.uk/svn/tracks-repos/trunk@266 a4c988fc-2ded-0310-b66e-134b36920a42
2006-06-20 02:07:18 +00:00
lukemelia
2796e3a4eb Refactor the Ajax for project creation to use RJS. Introduce the ARTS plugin to test RJS. Move the New Project form to the right-hand side a la the new item form. (I much prefer this -- other input?) Introduce new validation in project model that fixes #306.
git-svn-id: http://www.rousette.org.uk/svn/tracks-repos/trunk@265 a4c988fc-2ded-0310-b66e-134b36920a42
2006-06-19 06:36:00 +00:00