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

Added updatemytalks_as private handler and sub ajax_stateful_handler #62

Closed
wants to merge 1 commit into from
Closed

Added updatemytalks_as private handler and sub ajax_stateful_handler #62

wants to merge 1 commit into from

Conversation

nugged
Copy link

@nugged nugged commented Jul 23, 2015

Added 'updatemytalks_as' for ajax_stateful_handler to specifically set or clean user's
favorite task, not to toggle.

On some pages of YAPC::EU::2015 there is few 'favorite' buttons for same task,
and when they both off and visitor presses them one-by-one, they both become
toggled to 'on' state, but two in a row request to old updatemytalks_a handler
toggles task in favorites from off to on and back to off.

So we need separate handler:

  • updatemytalks_a -> toggles by 'task_id' in request.
  • updatemytalks_as -> sets 'task_id' favorite state depending from additional 'state' parameter

For latter one we already provide preparations in javascript already, there:
https://github.com/Act-Conferences/ye2015/blob/master/wwwdocs/js/main.js#L22-L26

Added 'updatemytalks_as' for ajax_stateful_handler to specifically set or clean user's
favorite task, not to toggle.

On some pages of YAPC::EU::2015 there is few 'favorite' buttons for same task,
and when they both off and visitor presses them one-by-one, they both become
toggled to 'on' state, but two in a row request to old updatemytalks_a handler
toggles task in favorites from off to on and back to off.

So we need separate handler:
* updatemytalks_a -> toggles by 'task_id' in request.
* updatemytalks_as -> sets 'task_id' favorite state depending from additional 'state' parameter

For latter one we already provide preparations in javascript already, there:
https://github.com/Act-Conferences/ye2015/blob/master/wwwdocs/js/main.js#L22-L26
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 this pull request may close these issues.

None yet

1 participant