aboutsummaryrefslogtreecommitdiff
path: root/data/templates
diff options
context:
space:
mode:
authorcweiske <cweiske@b3834d28-1941-0410-a4f8-b48e95affb8f>2009-10-28 08:02:17 +0000
committercweiske <cweiske@b3834d28-1941-0410-a4f8-b48e95affb8f>2009-10-28 08:02:17 +0000
commita3ba58dfc048c948230317191c67101c4aa80bfb (patch)
tree75dc0309ac92381e3df31820894aa79f320b9e1f /data/templates
parenta63765a4ad05b83f4c4ffcb7790b528f09f20a43 (diff)
downloadsemanticscuttle-a3ba58dfc048c948230317191c67101c4aa80bfb.tar.gz
semanticscuttle-a3ba58dfc048c948230317191c67101c4aa80bfb.tar.bz2
basic ajax voting support. has a bad counting bug somewhere
git-svn-id: https://semanticscuttle.svn.sourceforge.net/svnroot/semanticscuttle/trunk@445 b3834d28-1941-0410-a4f8-b48e95affb8f
Diffstat (limited to 'data/templates')
-rw-r--r--data/templates/bookmarks-vote.inc.tpl.php10
1 files changed, 7 insertions, 3 deletions
diff --git a/data/templates/bookmarks-vote.inc.tpl.php b/data/templates/bookmarks-vote.inc.tpl.php
index 5979827..d59feb4 100644
--- a/data/templates/bookmarks-vote.inc.tpl.php
+++ b/data/templates/bookmarks-vote.inc.tpl.php
@@ -13,11 +13,13 @@ if (isset($row['hasVoted']) && !$row['hasVoted']) {
} else {
$classes = 'vote-badge';
}
-echo '<span class="' . $classes . '">';
+echo '<span class="' . $classes . '" id="bmv-' . $row['bId'] . '">';
if (isset($row['hasVoted']) && !$row['hasVoted']) {
echo '<a class="vote-for" rel="nofollow" href="'
- . createVoteURL(true, $row['bId']) . '">+</a>';
+ . createVoteURL(true, $row['bId']) . '"'
+ . ' onclick="javascript:vote(' . $row['bId'] . ',1); return false;"'
+ . '>+</a>';
} else {
echo '<span class="vote-for-inactive">+</span>';
}
@@ -26,7 +28,9 @@ echo '<span class="voting">' . $row['bVoting'] . '</span>';
if (isset($row['hasVoted']) && !$row['hasVoted']) {
echo '<a class="vote-against" rel="nofollow" href="'
- . createVoteURL(false, $row['bId']) . '">-</a>';
+ . createVoteURL(false, $row['bId']) . '"'
+ . ' onclick="vote(' . $row['bId'] . ',-1); return false;"'
+ . '>-</a>';
} else {
echo '<span class="vote-against-inactive">-</span>';
}