Commit graph

2482 commits

Author SHA1 Message Date
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
bsag
f10e5b102e Changes made to the default datestamp in the migrations to fix compatability with PostgreSQL (see #218) caused even new actions to be marked as stale (#257). This also affected SQLite3, as reported by Sjoerd Siebinga on the mailing list.
This changeset sets the default datestamp using Rails to set a db-appropriate format. It fixes SQLite3, and I hope also PostgreSQL though I can't test this.

Fixes #257.



git-svn-id: http://www.rousette.org.uk/svn/tracks-repos/trunk@249 a4c988fc-2ded-0310-b66e-134b36920a42
2006-05-27 10:27:32 +00:00
lukemelia
d0784999c1 Projects marked as complete will no longer show up in the add new action form. I also cleaned up a little bit of ruby Array code in the sidebar. The reject{} method can be used a lot where we have been using collect{ ... }.compact. Fixes #297.
git-svn-id: http://www.rousette.org.uk/svn/tracks-repos/trunk@248 a4c988fc-2ded-0310-b66e-134b36920a42
2006-05-26 19:46:10 +00:00
bsag
d7acb70ee3 Added a white-space: nowrap declaration to the #date id as provided by Tim Martens. Supplements the fix provided by Ryan Nielsen in the previous commit.
Thanks Tim!



git-svn-id: http://www.rousette.org.uk/svn/tracks-repos/trunk@247 a4c988fc-2ded-0310-b66e-134b36920a42
2006-05-17 16:18:08 +00:00
lukemelia
14c04a1c9d Applied Ryan Nielsen's css patch to fix rendering of new header in Safari. Fixes #292.
git-svn-id: http://www.rousette.org.uk/svn/tracks-repos/trunk@246 a4c988fc-2ded-0310-b66e-134b36920a42
2006-05-17 12:49:16 +00:00
bsag
c63833401d Made some changes to the 'navigation bar' of all of the pages. Moved the 'toggle notes' link, add users (admin only) and logout links up to the top right corner, as they don't really fit with the other navigation links. The toggle notes link is now collapsed to one link which toggles, rather than a separate 'show' and 'hide' link (fixes #274).
Experimentally, I've made the whole top navigation section fixed so that it stays in place as the page scrolls, and it's black and slightly transparent to give it a different feel. I'm not sure if I like it or not, but it does make the links handily available.

I've also made the layout a bit more fluid to use the available width better. It's not quite right yet, but it works much better with wide displays (fixing #193) and also with narrow displays (fixing #262).



git-svn-id: http://www.rousette.org.uk/svn/tracks-repos/trunk@245 a4c988fc-2ded-0310-b66e-134b36920a42
2006-05-15 18:22:43 +00:00
bsag
6ba235d5cc Set the default charset to UTF-8 by default (if it hasn't been previously set). This is supposed to fix problems with UTF-8 on Firefox.
Fixes #279



git-svn-id: http://www.rousette.org.uk/svn/tracks-repos/trunk@244 a4c988fc-2ded-0310-b66e-134b36920a42
2006-05-13 15:02:59 +00:00
bsag
5cd580db6f Changed the Timzone setting in the iCal file from a hardcoded value to the value of ENV['TZ'] which is set in config/environment.rb. If no timezone is set, and default of GMT is used. Updated the comment in the file to make this clear.
Fixes #275



git-svn-id: http://www.rousette.org.uk/svn/tracks-repos/trunk@243 a4c988fc-2ded-0310-b66e-134b36920a42
2006-05-13 14:49:33 +00:00
bsag
c2967c452e My overzealous find-and-replace of the @response, @request etc. variables in [239] broke the iCal feeds. This is now fixed.
Changed the content-type of the iCal feeds to text/calendar which should fix problems with Mozilla Calendar. The feeds still work with iCal. Fixes #273.




git-svn-id: http://www.rousette.org.uk/svn/tracks-repos/trunk@242 a4c988fc-2ded-0310-b66e-134b36920a42
2006-05-13 14:25:56 +00:00
bsag
1129cc8ca6 Changed shebang in all the scripts/* scripts to /usr/bin/env ruby
New 'All projects' feed was reporting all projects as 'Done' because of a missing questionmark to test for truth.



git-svn-id: http://www.rousette.org.uk/svn/tracks-repos/trunk@241 a4c988fc-2ded-0310-b66e-134b36920a42
2006-05-13 13:58:14 +00:00
bsag
9e3169f286 Messed up the propedit on the root directory.
Added an ignore to *.tmproj files (TextMate project files).



git-svn-id: http://www.rousette.org.uk/svn/tracks-repos/trunk@240 a4c988fc-2ded-0310-b66e-134b36920a42
2006-05-13 13:40:20 +00:00
bsag
eefbb70660 Changed all instances of @response, @request, @session etc. to the new forms or response, request, session etc.
Fixes #266



git-svn-id: http://www.rousette.org.uk/svn/tracks-repos/trunk@239 a4c988fc-2ded-0310-b66e-134b36920a42
2006-05-13 13:32:39 +00:00
lukemelia
ca8a386dd7 Adds RSS and TEXT feeds for projects and contexts. fixes #282
git-svn-id: http://www.rousette.org.uk/svn/tracks-repos/trunk@238 a4c988fc-2ded-0310-b66e-134b36920a42
2006-05-13 05:58:29 +00:00
lukemelia
378800218a My last commit comment got cut off. Changeset [236] should have read as follows: Make id-based routes work properly. Fixes #287.
git-svn-id: http://www.rousette.org.uk/svn/tracks-repos/trunk@237 a4c988fc-2ded-0310-b66e-134b36920a42
2006-05-13 04:06:35 +00:00
lukemelia
1517070f4f fixes certain routes that didnt
git-svn-id: http://www.rousette.org.uk/svn/tracks-repos/trunk@236 a4c988fc-2ded-0310-b66e-134b36920a42
2006-05-13 04:02:47 +00:00
lukemelia
07aade6882 Add two new API methods: ListContexts and ListProjects. See http://0.0.0.0:3000/backend/invoke to experiment.
git-svn-id: http://www.rousette.org.uk/svn/tracks-repos/trunk@234 a4c988fc-2ded-0310-b66e-134b36920a42
2006-05-04 05:38:47 +00:00