Commit graph

247 commits

Author SHA1 Message Date
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
lukemelia
bb51ea9db5 Get all the tests passing again, in preparation to add another validation on the project and context models.
git-svn-id: http://www.rousette.org.uk/svn/tracks-repos/trunk@264 a4c988fc-2ded-0310-b66e-134b36920a42
2006-06-19 04:04:20 +00:00
bsag
2ca153a771 Implemented a proper mobile view, designed for viewing on a mobile phone browser (so far only tested on 'small screen' view of Opera, which mimics Opera mini). To get the mobile view, enter the URL http://yoururl.com/mobile/
That will take you to the login page, and then to the mobile view. I've tried to make the interface as functional as possible, while still fitting neatly on a small screen, being very lightweight in terms of page size (those data plans are expensive!), and not requiring too much messing about with a phone keyboard. 

The main screen lists all uncompleted next actions, 6 per page. If you select the double right arrow link, you'll be taken to a detail view which doubles as a place to view all the details, or an editing page (hit the back button to get back if you're just viewing, update to commit your edits).

At the bottom of each page there are two select boxes which allow you to filter the view to a particular context or project.

It needs a little more work, but it's quite functional right now.



git-svn-id: http://www.rousette.org.uk/svn/tracks-repos/trunk@263 a4c988fc-2ded-0310-b66e-134b36920a42
2006-06-18 17:17:34 +00:00
lukemelia
da22d34962 Enable user-specific, cookie-based storage of context collapse/expand settings on the homepage. Also, removed unused cookie get/set code from the toggle_notes.js file
git-svn-id: http://www.rousette.org.uk/svn/tracks-repos/trunk@262 a4c988fc-2ded-0310-b66e-134b36920a42
2006-06-10 17:09:16 +00:00
bsag
cf0d56e10b Changed all the created_at and updated_at fields back to a null default to fix #301. It seems that the problem with datetime fields and Postgresql was a Rails bug that was fixed in 1.1, so it should be OK now.
Unfortunately, I couldn't seem to create a migration to revert the fields, so I had to alter the older migration files. This means that if you're using the trunk you need to export your data, delete the database, create it again, run rake db:migrate and then reimport your data. Make sure you backup the whole database first, just in case!



git-svn-id: http://www.rousette.org.uk/svn/tracks-repos/trunk@261 a4c988fc-2ded-0310-b66e-134b36920a42
2006-06-10 13:57:59 +00:00
bsag
b78b0f4eca Fixed up viewing of notes on the 'Done' page. They can now be toggled just like on the main page.
Fixes #284.



git-svn-id: http://www.rousette.org.uk/svn/tracks-repos/trunk@260 a4c988fc-2ded-0310-b66e-134b36920a42
2006-06-10 12:41:15 +00:00
lukemelia
7b984328e3 Exclude user_id from projects, contexts and notes xml. My rationale here is that if tracks is a multi-user application, user_id is always set by authenticated credentials and so there is no valid reason to expose it with the data.
git-svn-id: http://www.rousette.org.uk/svn/tracks-repos/trunk@259 a4c988fc-2ded-0310-b66e-134b36920a42
2006-06-10 06:05:01 +00:00
lukemelia
abbed6b376 Make Tracks respond to request for xml to /todo/show/[action id]. Try it out using something like:
curl -H 'Accept: application/xml' --basic --user YOUR_TRACKS_USERNAME:YOUR_TRACKS_PASSWORD http://localhost:3000/todo/show/22



git-svn-id: http://www.rousette.org.uk/svn/tracks-repos/trunk@258 a4c988fc-2ded-0310-b66e-134b36920a42
2006-06-10 06:00:32 +00:00
lukemelia
0765c801a4 Web-service enable homepage actions by context listing using responds_to. Try it out using:
curl -H 'Accept: application/xml' --basic --user YOUR_TRACKS_USERNAME:YOUR_TRACKS_PASSWORD http://localhost:3000/



git-svn-id: http://www.rousette.org.uk/svn/tracks-repos/trunk@257 a4c988fc-2ded-0310-b66e-134b36920a42
2006-06-10 05:52:20 +00:00
lukemelia
c2fb93415c Add copyright attribution for some http_auth code. The code in question is published under an MIT license. See thread at http://blog.codahale.com/2006/05/11/basic-http-authentication-with-rails-simple_http_auth/ for more info.
git-svn-id: http://www.rousette.org.uk/svn/tracks-repos/trunk@256 a4c988fc-2ded-0310-b66e-134b36920a42
2006-06-07 04:11:57 +00:00
bsag
e061dbbc23 Upgraded vendor/rails to Rails 1.1.2
git-svn-id: http://www.rousette.org.uk/svn/tracks-repos/trunk@255 a4c988fc-2ded-0310-b66e-134b36920a42
2006-06-04 18:46:26 +00:00
bsag
01ac255778 The login_controller functional tests failed because the logic for should_expire_sessions was back to front. Fixed and tests pass now.
Deleted vendor/rails in preparation to freeze to Rails 1.1.2



git-svn-id: http://www.rousette.org.uk/svn/tracks-repos/trunk@254 a4c988fc-2ded-0310-b66e-134b36920a42
2006-06-04 18:45:04 +00:00
bsag
edcc065659 Applied user preferences form patch by Janet Riley:
The 'week_starts' and 'due_style' preferences can now be selected with an options list rather than entered in a textfield. This makes much more sense without the user having to look at the help notes.



git-svn-id: http://www.rousette.org.uk/svn/tracks-repos/trunk@253 a4c988fc-2ded-0310-b66e-134b36920a42
2006-06-04 14:20:32 +00:00
bsag
f395a37e63 Added the lightbox interface to the project and context pages too, but altered it so that it's activated by a hidden link (using the hotkey Ctrl/Alt Q). The actual link on the page opens the inline form as usual, and is activated by Ctrl/Alt N). So the lightbox is still available, but optional.
For some reason that I really can't figure out, adding an action to the context page results in the badge being incremented by two, but almost identical code on the project page gives the correct count. Baffling, but I'm sure I'm missing something that's staring me in the face.



git-svn-id: http://www.rousette.org.uk/svn/tracks-repos/trunk@252 a4c988fc-2ded-0310-b66e-134b36920a42
2006-06-04 14:02:35 +00:00
lukemelia
463a61f514 This changeset introduces some integrated web service type features that take advantage
of the Rails 1.1 responds_to functionality. It also lays a foundation for future API
enhancements.

Basically, if you request the /projects, contexts/ or notes/ URLs with a client that specifies that it wants XML, Tracks will return XML. See DHH on the Accept header (http://www.loudthinking.com/arc/000572.html).

But there's a wrinkle. The controller actions mapped to these URLs are protected by an authentication filter. In normal use, Tracks redirects an unauthenticated user to the login screen for session-based authentication.

I've added a secondary authentication check that looks for a valid username and password coming from HTTP_BASIC authentication.

To test out the new functionality, try this:

curl -H 'Accept: application/xml' --basic --user YOUR_TRACKS_USERNAME:YOUR_TRACKS_PASSWORD http://localhost:3000/projects/

curl -H 'Accept: application/xml' --basic --user YOUR_TRACKS_USERNAME:YOUR_TRACKS_PASSWORD http://localhost:3000/contexts/

curl -H 'Accept: application/xml' --basic --user YOUR_TRACKS_USERNAME:YOUR_TRACKS_PASSWORD http://localhost:3000/notes/

HTTP_BASIC sends passwords in plain text, so the use of https is encouraged.

I haven't tested this on a shared host yet, but Coda Hale, whose simple_http_auth inspired this solution and provided some copy and paste code for it (thanks, Coda!), has some notes about how to make it work in his plugin readme (http://svn.codahale.com/simple_http_auth/README). To wit, putting the following in .htaccess:

  RewriteRule ^(.*)$ dispatch.fcgi [E=X-HTTP_AUTHORIZATION:%{HTTP:Authorization},QSA,L]

My thinking on this architecture is as follows:

1) Follow the spirit of responds_to and DRY to leverage existing controller code for API functionality
2) Get away from using the user token for API interactions. Let's keep it for feeds, so it's basically a "lite" form of security for read-only feeds.
3) Keep Tracks in shape to adopt the simply_restful plugin being developed alongside Rails Edge

There's no real new functionality in this release that the existing API didn't provide (except for seeing your notes as XML, and somehow I don't think people are clamoring for that), but this work is an important step to being able to implement the types of API features people have been asking for.

While I was at it, I did some refactoring to the login_controller for readability and style.

Finally, I replaced the activity indicator graphic to work with the new navigation background color.



git-svn-id: http://www.rousette.org.uk/svn/tracks-repos/trunk@251 a4c988fc-2ded-0310-b66e-134b36920a42
2006-06-04 07:07:42 +00:00
bsag
3da6fe2525 Tried out using a modal 'lightbox' style dialog for the new next action form on the home page (I'm using the scripts written by Bruno of [http://blog.feedmarker.com/2006/02/12/how-to-make-better-modal-windows-with-lightbox/ Feedmarker]).
Instead of opening up a form on the main page, clicking the 'Add new action' link (or hitting Alt/Ctrl N) opens up an overlay window, with a semi-transparent window underneath. You can add as many actions as you like by filling in the forms and hitting submit, then when you're done, click the close box or the shaded overlay area to dismiss the window.

It works very well on Safari, but for some reason, on my copy of Firefox, the cursor is invisible.

My plan is to also allow deferred actions to be added using this form, and eventually set up editing of existing actions to use the same format.



git-svn-id: http://www.rousette.org.uk/svn/tracks-repos/trunk@250 a4c988fc-2ded-0310-b66e-134b36920a42
2006-05-29 11:02:28 +00:00