Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

next actions with sensitive due-date doesn't automatically sorted with Ajax #256

Closed
dnrce opened this issue Jun 25, 2014 · 5 comments · Fixed by #1825
Closed

next actions with sensitive due-date doesn't automatically sorted with Ajax #256

dnrce opened this issue Jun 25, 2014 · 5 comments · Fixed by #1825
Milestone

Comments

@dnrce
Copy link
Member

dnrce commented Jun 25, 2014

Migrated from the original issue at https://www.assembla.com/spaces/tracks-tickets/tickets/256

When I add new next action with due date set it goes to the bottom of the specified context unconditionally.

It's only gets sorted to a proper place of the list when I refresh the page.

Originally reported by Anonymous on April 4, 2006 at 21:01:30 (+0800)

@dnrce dnrce added this to the Someday/Maybe milestone Jun 25, 2014
@dnrce
Copy link
Member Author

dnrce commented Jun 25, 2014

On April 4, 2006 at 19:17:20 (+0800), Anonymous commented:

I'm not sure that there's much we can do about that because of the way that Ajax and the RJS templates work. We could re-render the whole context box, sorting it as we do so, but that would mean pulling in a lot more data than necessary, slightly negating the benefits of Ajax. I also think that it's a bit confusing if actions are shifting themselves around when you add them. If it's always added at the bottom, you know where it is.

I'll leave this active in case I think of some cunning plan for getting around it, but it's low priority.

@dnrce
Copy link
Member Author

dnrce commented Jun 25, 2014

On May 5, 2006 at 09:44:37 (+0800), Anonymous commented:

Why not sort on the client side with Javascript? Perhaps you could embed a sortable key in the return value that would assist in the client side sorting.

@dnrce
Copy link
Member Author

dnrce commented Jul 11, 2014

This is also an issue when the context is changed (from #938).

@dnrce
Copy link
Member Author

dnrce commented Jul 11, 2014

Related to #393

@C-Otto
Copy link
Contributor

C-Otto commented Apr 1, 2015

I'm working on this, and have a working prototype. My approach is to add a datasort="..." attribute to each action's div. The value is the unix epoch derived fromt he action's due attribute. The sorting is done using JavaScript, although I still need to figure out where to put the code (adding actions and sorting is happening in many places, it seems).

Is this a feasible approach?

This was referenced Apr 14, 2015
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants