Commit graph

30 commits

Author SHA1 Message Date
bsag
c58f41775c Quite a few improvements to Ajax handling here:
* Installed the RJS plugin http://www.codyfauser.com/articles/2005/12/05/rjs-templates-plugin-subversion-repository
* Used the RJS templates to update multiple page elements on addition and deletion of actions: the new action gets added, the count 'badge' is updated correctly, and a status area provides helpful information.
* If your data entry triggers validation errors e.g. no description for the next action), the errors are displayed in the status area (not very prettily as yet...)
* The message about the context/project having no uncompleted actions automagically appears/disappears without refreshing the page.

The editing and toggling of actions hasn't been updated yet.


git-svn-id: http://www.rousette.org.uk/svn/tracks-repos/trunk@171 a4c988fc-2ded-0310-b66e-134b36920a42
2006-01-04 19:49:15 +00:00
bsag
7d33019265 Changed the instances of :project (referring to flagging whether we are on a project page) for an @on_page = "project" variable. In forms, I send a request parameter @param["on_project_page"] to set @on_page to "project" before rendering the partial.
It works fine except in the following circumstances, which I can't seem to figure out:

* If you edit an action on a project page, it will render with '[P]' link until you refresh
* If you mark an action completed on a project page, it will also render with a '[P]' link until you refresh.

However, adding a new action on a project page renders properly immediately.



git-svn-id: http://www.rousette.org.uk/svn/tracks-repos/trunk@167 a4c988fc-2ded-0310-b66e-134b36920a42
2005-12-07 19:06:24 +00:00
bsag
80f3fdbc77 Applied Luke's patch (#164) to decrease the size of the homepage and load the edit forms dynamically when the edit button is clicked. Thanks, Luke!
As a result, I'm going to redo the empty message changes I made in [164], and will see if I can find a more sensible way to implement them. The empty messages still appear (now also in the notes area if that's empty), but you need a refresh after Ajax changes to view or remove them.



git-svn-id: http://www.rousette.org.uk/svn/tracks-repos/trunk@165 a4c988fc-2ded-0310-b66e-134b36920a42
2005-12-04 11:43:09 +00:00
bsag
8349e760b3 First stage of cleaning up the messages in project/show which remind you if there are no uncompleted or completed actions, or notes in the current project. The show method checks whether @not_done, @done or @notes is empty, and if it is sets a message which is displayed in the partial.
I've added Scriptaculous calls to the Ajax for adding a new action, or completing a previously not done action removes the appropriate message (as these activities must logically make @not_done and @done non-empty. Similar thing added for project notes.

The next step will be to handle those cases where the last action is completed or deleted, or an unchecked done item refills the not_done actions, which is trickier to pick up. Then I'll repeat for context and todo views.



git-svn-id: http://www.rousette.org.uk/svn/tracks-repos/trunk@164 a4c988fc-2ded-0310-b66e-134b36920a42
2005-11-27 17:56:34 +00:00
bsag
8a342036a1 Updated for Rails 0.14.3
* Fixed unchecking of next actions on context and project pages, so that they now update visually, as well as changing the database.
* For some reason, the completion field was not being saved, which was messing up the completed page. That's fixed now.
* Deletion and editing of items was broken on context/show and project/show. That's fixed now, but if you uncheck a completed item, then attempt to delete or edit an item without a refresh it will fail. I'm not sure what I can do about this.
* Next actions on project and context pages now show the appropriate link to contexts and projects respectively, even when first created by Ajax.



git-svn-id: http://www.rousette.org.uk/svn/tracks-repos/trunk@162 a4c988fc-2ded-0310-b66e-134b36920a42
2005-11-13 11:50:18 +00:00
bsag
a948beefee Fixes #135 (projects page incorrectly referring to context page for Sortable drag and drop code, so changes to project sort order were not sticking after a refresh.
Fixed #142 - the 500 error was being generated on dragging projects and contexts to reorder because the order method was looking for an order view and layout. I've added a :render => nothing statement to order now,and that seems to fix the error.



git-svn-id: http://www.rousette.org.uk/svn/tracks-repos/trunk@158 a4c988fc-2ded-0310-b66e-134b36920a42
2005-10-31 07:52:07 +00:00
bsag
5e4f0f9fe8 Improved the security of the new drag and drop features of the projects and contexts lists by checking that the logged in user owns those items.
Also changed references to Form.focus_first which were defined in the removed file prototype-ex.js to Form.focusFirstElement, which is defined in prototype.js. Fixes #133.



git-svn-id: http://www.rousette.org.uk/svn/tracks-repos/trunk@149 a4c988fc-2ded-0310-b66e-134b36920a42
2005-10-10 21:14:34 +00:00
bsag
5ce97df3f4 Quite a few changes in this revision:
1. The contexts and projects lists are now drag and droppable. In other words, if you visit [tracks_url]/projects or [tracks_url]/contexts, you can grab the 'DRAG' handle with the mouse and drag and drop the projects or contexts into your preferred order. At the same time, this re-orders the 'position' column appropriately, so that changes in order will be reflected on other pages. '''NB''': At the moment, deleting projects and contexts is a bit buggy. The item doesn't disappear, but if you refresh the page it will update appropriately. Also, if you add a new item, you can't drag it until you refresh. I'll try to fix these things. Fixes #115.
2. Fixed typo of 'tomorrow' due date label. Fixes #131
3. I updated the syntax for some of the visual effects to use the new {{{visual_effect(:fade, 'element')}}} syntax. Also removed the javascript files effects2 and prototype-ex, which aren't used now. 


git-svn-id: http://www.rousette.org.uk/svn/tracks-repos/trunk@148 a4c988fc-2ded-0310-b66e-134b36920a42
2005-10-09 17:51:31 +00:00
nic
91641500a7 Merged tracks-mu-import branch changes r113:130 into the trunk
git-svn-id: http://www.rousette.org.uk/svn/tracks-repos/trunk@131 a4c988fc-2ded-0310-b66e-134b36920a42
2005-08-08 01:54:05 +00:00
bsag
3f90096bb8 Completed projects no longer appear in the Projects drop down on all the forms. Fixes #66.
git-svn-id: http://www.rousette.org.uk/svn/tracks-repos/trunk@105 a4c988fc-2ded-0310-b66e-134b36920a42
2005-06-12 12:14:30 +00:00
bsag
b4d72cf17a Updated the documents, which are now in doc (CHANGELOG and README_FOR_APP).
Also removed the tabs from all the files, and replaced with spaces (2 per tab).


git-svn-id: http://www.rousette.org.uk/svn/tracks-repos/trunk@102 a4c988fc-2ded-0310-b66e-134b36920a42
2005-06-11 12:24:19 +00:00
bsag
977ca82306 Fixes #62.
The problem was that project (and context) names were made into URLs via the 'urlize' method which substituted spaces for underscores and downcased the string. This was then converted back to the real project name by the Rails method 'humanize', which substituted spaces for underscores and Capitalized the string (i.e. only the first word was given an initial capital). This meant that visiting /project/show/project_name would fail if the real project name was either 'Project Name' or 'project name'.

I altered 'urlize' to maintain the capitalization that was entered, and created a new method 'deurlize' that just reversed this change (i.e. swapped underscores for spaces, but left capitalization as is).


git-svn-id: http://www.rousette.org.uk/svn/tracks-repos/trunk@101 a4c988fc-2ded-0310-b66e-134b36920a42
2005-06-07 18:39:51 +00:00
bsag
9f89610fab The dropdowns for contexts and projects are now ordered by the position attribute, so if you move your 'default' context or project to the top of the list in /contexts and /projects, that will be the default option in the dropdown.
git-svn-id: http://www.rousette.org.uk/svn/tracks-repos/trunk@95 a4c988fc-2ded-0310-b66e-134b36920a42
2005-06-04 17:11:59 +00:00
bsag
ed5d72e9e1 Contexts and projects can now be sorted in any order you like. Arrow buttons on the /contexts and /projects pages let you move an item to the top, up, down or to the bottom. For contexts, this affects the order in which they sort on the home page. Fixes #46.
git-svn-id: http://www.rousette.org.uk/svn/tracks-repos/trunk@90 a4c988fc-2ded-0310-b66e-134b36920a42
2005-05-29 09:32:02 +00:00
bsag
8406a482d5 Merged branches/TRY-BSAG-ajax back to the trunk.
...and we're back!


git-svn-id: http://www.rousette.org.uk/svn/tracks-repos/trunk@86 a4c988fc-2ded-0310-b66e-134b36920a42
2005-05-28 14:08:44 +00:00
bsag
8998c7f520 Added a count of next actions to the /projects page, showing how many uncompleted next actions remain for each project. Fixes #7.
git-svn-id: http://www.rousette.org.uk/svn/tracks-repos/trunk@58 a4c988fc-2ded-0310-b66e-134b36920a42
2005-04-03 15:03:59 +00:00
bsag
0577e850f6 [Contributed by Arnaud Limbourg, ticket:18] A new entry in settings.yml allows you to choose the number of completed actions you want to see on the /todo/list home page. Also sorts by due date (ascending) first, then creation date (descending) on /todo/list, /context/show/[name], and /project/show/[name]
git-svn-id: http://www.rousette.org.uk/svn/tracks-repos/trunk@57 a4c988fc-2ded-0310-b66e-134b36920a42
2005-04-03 11:45:05 +00:00
bsag
ec69c71564 [Contributed by Nicholas Lee] Changes to the way that URLs are specified which should improve the situation for people using Tracks in a subdirectory.
git-svn-id: http://www.rousette.org.uk/svn/tracks-repos/trunk@54 a4c988fc-2ded-0310-b66e-134b36920a42
2005-03-30 15:35:37 +00:00
bsag
7c814b5131 Prefixed all page titles with "TRACKS::" to make them more obvious when you have several windows open. Fixes ticket:15 suggested by timfm.
git-svn-id: http://www.rousette.org.uk/svn/tracks-repos/trunk@51 a4c988fc-2ded-0310-b66e-134b36920a42
2005-03-30 08:54:28 +00:00
bsag
e0b9ba0182 Added first patch contributed by Jim Ray: adds a host of fixes and bits of cleaning up, including a position column for contexts and projects to allow custom sorting, and changes to the links for pages to make them more human-readable.
I also added a pop-up calendar to set the due date. This is entirely lifted from Michele's excellent tutorial on pxl8.com (<http://www.pxl8.com/calendar_date_picker.html>). It works well, but I need to make sure it doesn't break in postgresql or sqlite.


git-svn-id: http://www.rousette.org.uk/svn/tracks-repos/trunk@49 a4c988fc-2ded-0310-b66e-134b36920a42
2005-03-27 17:45:49 +00:00
bsag
6f51118766 Patch submitted by Sean Santry: this adds more useful information to the flash notifications when items are added, deleted or created, by giving you the name of the context, project or next action that you are acting on. Thanks Sean!
git-svn-id: http://www.rousette.org.uk/svn/tracks-repos/trunk@44 a4c988fc-2ded-0310-b66e-134b36920a42
2005-03-10 22:40:01 +00:00
bsag
49b2ad4dc7 Added caching properly this time. Caches todo/list page quite well, then list action of context and projects controllers.
git-svn-id: http://www.rousette.org.uk/svn/tracks-repos/trunk@32 a4c988fc-2ded-0310-b66e-134b36920a42
2005-02-27 12:27:35 +00:00
bsag
f2861a5bc7 Removed the last of the scaffolding from the project and context controllers, which was just supporting the editing of individual context or project names.
Tinkered a bit with the form layout and appearance.



git-svn-id: http://www.rousette.org.uk/svn/tracks-repos/trunk@18 a4c988fc-2ded-0310-b66e-134b36920a42
2005-02-06 14:36:55 +00:00
bsag
14298d1787 Changed the method of specifying a date to one using form options. By default, a blank date (which returns NULL) is selected. The due date is still _displayed_ in your chosen date format (from settings.yml).
This seems a more robust method, and is much simpler to use. The month is given as a name rather than a number, so it's obvious what should be entered.



git-svn-id: http://www.rousette.org.uk/svn/tracks-repos/trunk@17 a4c988fc-2ded-0310-b66e-134b36920a42
2005-02-05 14:43:40 +00:00
bsag
3fe9326322 Emergency diff to make sure everything is safe. No major changes.
git-svn-id: http://www.rousette.org.uk/svn/tracks-repos/trunk@16 a4c988fc-2ded-0310-b66e-134b36920a42
2005-02-04 06:29:33 +00:00
bsag
ed4481f3b6 Added a new row to the context table: hide. This determines whether a context gets hidden from the front todo/list page (it can still be accessed directly or via the context/list page). If it's true (1), the context is hidden. By default, it's false, so you don't have to check the box for every context you add, only the ones you want to hide.
git-svn-id: http://www.rousette.org.uk/svn/tracks-repos/trunk@14 a4c988fc-2ded-0310-b66e-134b36920a42
2005-01-23 19:49:41 +00:00
bsag
9a649506a5 Yet more refactoring, particularly of the option drop downs.
git-svn-id: http://www.rousette.org.uk/svn/tracks-repos/trunk@13 a4c988fc-2ded-0310-b66e-134b36920a42
2005-01-23 19:15:17 +00:00
bsag
3c196c46d8 Fixed the count of undone items on the main page again, after breaking it ;-)
git-svn-id: http://www.rousette.org.uk/svn/tracks-repos/trunk@11 a4c988fc-2ded-0310-b66e-134b36920a42
2005-01-23 12:31:10 +00:00
bsag
d7b1c6e167 Having problems committing.
git-svn-id: http://www.rousette.org.uk/svn/tracks-repos/trunk@9 a4c988fc-2ded-0310-b66e-134b36920a42
2005-01-22 15:43:39 +00:00
bsag
ec3ee77797 Initial import
git-svn-id: http://www.rousette.org.uk/svn/tracks-repos/trunk@1 a4c988fc-2ded-0310-b66e-134b36920a42
2005-01-09 11:59:57 +00:00