Re: Voting buttons at bottom rather than top?
by Fletch (Bishop) on Jan 29, 2009 at 22:09 UTC
|
Should be trivial to whip up your own custom CSS, or at worst some jQuery that iterates over $('td.reply-body div.vote') and removes and then appends each one to the enclosing element.
The cake is a lie.
The cake is a lie.
The cake is a lie.
| [reply] [d/l] |
|
| [reply] |
|
| [reply] [d/l] |
Re: Voting buttons at bottom rather than top?
by shmem (Chancellor) on Jan 29, 2009 at 22:21 UTC
|
| [reply] |
Re: Voting buttons at bottom rather than top?
by jvector (Friar) on Jan 29, 2009 at 23:07 UTC
|
Fletch: .. for me, no CSS is trivial ;-) Maybe this year I get over whatever is in the way and get there!shmem: thank you for the reference. Quite a lot there to take in but I will go into it. (Interesting aside... for many years I have actually been quite happy using a mouse + a keyboard together and wondered why some people are so vociferous about using only a keyboard ... at a desktop computer. Now I am often talking to PM on a laptop in the living room c/o wireless, and switching from keys to touchpad is, though closer, somehow a lot more intrusive.) My thanks to both. As ever, PerlMonks acts not as a source of Answers to Questions but as a stimulus to more inquiry and learning. I'm now just waiting for the moon to slow us down to a 26-hour day.
This signature would be ready by Christmas if days had 26 hours
| [reply] |
|
Haha, the same thing happened to me. I just got a laptop earlier this month (I have been using a desktop for ~2 years) and I hate having to use the touchpad. Let me know what you decide to do, I may want to follow suit. :)
And you didn't even know bears could type.
| [reply] |
Re: Voting buttons at bottom rather than top?
by Hue-Bond (Priest) on Jan 31, 2009 at 03:20 UTC
|
This is my incomplete implementation, to be used from the free nodelet. It moves the radio button to the cell at the right, above the options [reply], [/msg], [d/l] and such.
<script language="Javascript">
// reparent voting radio buttons
var replies_table = document.getElementById ('replies_table');
if (replies_table) {
var divs = replies_table.getElementsByTagName ('div');
for (var i = divs.length - 1; i >= 0; i--) {
var node = divs`[i`];
var class = node.getAttribute('class');
if ('vote' != class) { continue; }
var dest = node.parentNode.nextSibling;
// remove <center> tag
node.innerHTML = node.firstChild.innerHTML;
// discard spacing between <label>s
var children = node.childNodes;
for (var j = children.length - 1; j >= 0; j--) {
var c = children`[j`];
//alert (c.tagName + ' ' + c.innerHTML);
if ('LABEL' != c.tagName) {
node.removeChild (c);
continue;
}
}
// insert <br>s between <label>s
for (var j = children.length - 1; j >= 1; j--) {
node.insertBefore (document.createElement ('br'), children
+`[j`]);
}
// add a couple of nbsp's to make the cell wider in
// order to make room for the "+=0" vote option
dest.firstChild.innerHTML += ' ';
// add the vote buttons div to the cell at the right
dest.insertBefore (node, dest.firstChild); // appendChild (no
+de);
//alert ('index (' + i + ') class (' + class + ') dest.innerHT
+ML (' + dest.innerHTML + ')');
}
}
</script>
Things to be improved:
- Only moves radio buttons in replies, not in the node displayed at the top.
The text +=0 appears on its own line, instead of being at the right of its radio button (not an issue for some users). I don't know how to fix that. (Update: if the cell includes the option [select], it gets wide enough and this problem doesn't happen). (Update, more than one year later: it just struck me that adding a couple of s to the [reply] link would be enough to widen the cell and make room for the +=0, thereby fixing the bug.
| [reply] [d/l] [select] |
|
| [reply] |
Re: Voting buttons at bottom rather than top? (butterfly ballot)
by tye (Sage) on Jan 29, 2009 at 23:42 UTC
|
I have looked at several mock-ups placing voting radio buttons at the bottom of each node, but they all were too easy to see as the voting radio buttons being above the author information (an interpretation that would lead to one voting on the wrong node).
So, as is so often the case, the devil is in the details. If you want buttons at the bottom, then move them for yourself in a way that won't confuse you. If you hope for the site to add an option for putting the buttons there, then produce the mock-up that shows a good way to do it, since I have yet to see one.
| [reply] |
|
tye, if you could supply the bad ones, I could give a try while avoiding those, resulting in a shorter try-fail loop.
| [reply] |
|
| [reply] |
|
| [reply] |