Closed (fixed)
Project:
Decisions
Version:
6.x-1.3
Component:
User interface
Priority:
Normal
Category:
Feature request
Assigned:
Unassigned
Reporter:
Created:
21 Jan 2010 at 17:54 UTC
Updated:
29 Mar 2010 at 15:30 UTC
Jump to comment: Most recent file
Comments
Comment #1
anarcat commentedYes: everything is possible. ;) However, I'm not sure what would be gained by that: the whole page has to reload anyways for the blocks to be updated and the results shown properly.
Comment #2
chandrabhan commentedThanks for the response. I am not sure whether we need to refresh the whole page. User submits his/her vote within a block then the block gets refreshed to show the current result (something that cnn.com does) and possibly showing what user have voted for. If the poll is submitted in its own node page then I think it is ok to refresh the whole page.
Comment #3
anarcat commentedOkay, so there's two of you now (#705852: Asynchronous submission of selection votes), I give up. :) I would welcome a patch that does that, but I don't have time to work on it.
Comment #4
ezra-g commentedAt the above referenced issue, anarcat said:
I think we can ensure that even with AJAX submission, the displayed results take into the vote being cast. I'm working on a project that calls for this so hopefully I'll have a patch here in the next couple of weeks.
Comment #5
ezra-g commentedI see an AJAX submit form replacing the radios and submit button with one button per vote option. This would also be the degradable behavior and still allow single-click voting, rather than clicking the radio and then clicking submit.
Would you prefer to keep current form that includes radios as a configurable option, or shall I implement a button-based (degradable) vote submission as well?
Thanks!
Comment #6
anarcat commentedHum. If we have a single possible choice, buttons do make more sense than radios, I guess, but that's a specific use case... We can technically have multiple choices valid, in which case we have checkboxes, and then we need a submit button. It may be confusing from a UI perspective to have single click sometimes and multi-click other times...We should strive for a consistent interface... However, in this case, it seems like a minor change, so I wouldn't object that that change. Keep in mind that it won't solve the general AJAX submission problem: if we have multiple choice, we should have AJAX too.
In general, I see the two things as orthogonal: we can have AJAX submissions with or without radio boxes. And in fact, we don't need radio boxes for non-AJAX voting...
Comment #7
ezra-g commentedAnarcat and I discussed this in IRC and concluded that replacing the radios for buttons for single-choice voting is an acceptable solution. Assigning to me.
Comment #8
chandrabhan commentedI would love to see it as configurable rather than default. User has to now click undo button or something if he has accidentally pressed one of the option buttons. Coming back to original premise of the issue, I would appreciate if we can get ajax submission of the form irrespective of radio button or otherwise for the options.
Comment #9
anarcat commentedI agree that "single click voting" should be an option. I don't care if it's set by default, but we should allow people to enforce a two-click process, as this is a matter of policy of the site administrator ("tools not policy"). Some people may *want* to have people click (and therefore think) twice before voting.
Besides, this is orthogonal to the AJAX voting issue: let's keep those two separate please.
Comment #10
ezra-g commentedHere's an initial patch that implements 1click voting as a configuration option, as well a aynchronous voting as a config option, so as to preserve existing functionality.
Some of what's left:
- Style the 1-click voting controls so that they are spaced evenly and are more visible
- Hopefully improve the jQuery here so that the fadeIn happens only once the fadeOut has completed.
Comment #11
ezra-g commentedAnd here's the bit of jQuery that goes in /modes.
Comment #12
ezra-g commentedHere's the improvement I mentioned to the jQuery fadeIn/Out. Stay tuned for better default styling on the links.
Comment #13
ezra-g commentedHere's a re-roll to keep up with HEAD ;). Aside from link style, this is reviewable.
Comment #14
ezra-g commentedHere's a re-roll that improves the styling of the 1-click voting controls and a new css file. It works with the js in #12. If it would be helpful, I can post a movie to demonstrate the functionality here.
Comment #15
ezra-g commentedMarking NW as votes aren't stored properly and themeability could be improved. Stay tuned.
Comment #16
ezra-g commentedHere are a revised patch and new css, js files that is ready for review. The css and jss go in /modes.
Comment #17
ezra-g commentedHere's a revised patch. I apologize that I committed the css and js files accidentally, so this shows a minor diff against them. You can see them in their "current" state at http://drupalcode.org/viewvc/drupal/contributions/modules/decisions/mode... .
I plan to commit this later today.
Comment #18
anarcat commentedgo: i don't have time to review this week and i trust you this will work with or without js. :)
Please keep whitespace changes to a minimum while committing feature or bug fixes.
Comment #19
ezra-g commentedI committed this change, removing the whitespace changes.
Comment #20
ezra-g commentedComment #22
wonder95 commentedI could really use this, but I don't see where to get this code, since there is no dev release. The current version is 6.15, but it looks like this patch was done against 6.1.3 (and it fails when I apply it to 6.15). Do I just need to grab the latest manually from here?
Thanks.
Comment #23
ezra-g commentedYou can checkout the latest changes from CVS (HEAD) or grab the nightly snapshot here http://drupal.org/node/96062 -- Looks like we might need a d.o admin to edit some metadata about that release to get it on the project page. Thanks for asking -- I'll look into it.
Comment #24
ezra-g commented