diff --git a/uVote/api/api_uvote.php b/uVote/api/api_uvote.php index ac01b77..83034d9 100644 --- a/uVote/api/api_uvote.php +++ b/uVote/api/api_uvote.php @@ -48,6 +48,10 @@ class api_uvote extends \SYSTEM\API\api_login { } + public static function call_vote_action_accord($party){ + return votes::vote_accord_with_party($party); + } + public static function call_graph_bt_to_uvote_overall_by_time($timespan = 84600){ return votes::get_graph_bt_to_uvote_overall_by_time($timespan);} } diff --git a/uVote/api/votes/votes.php b/uVote/api/votes/votes.php index 5f524c3..0a7a41b 100644 --- a/uVote/api/votes/votes.php +++ b/uVote/api/votes/votes.php @@ -141,6 +141,16 @@ class votes { return \DBD\UVOTE_DATA_UVOTE_TO_PARTY_OVERALL::QA(array()); } + public static function vote_accord_with_party($party){ + if (\SYSTEM\SECURITY\Security::isloggedin()){ + $user = \SYSTEM\SECURITY\Security::getUser()->id; + } else { + throw new ERROR("U need to be logged in....sry bro / sis"); + } + //echo "TEEEEEEEEEEEEEEEEEEEEEEEEEEEEST".$party.\SYSTEM\SECURITY\Security::getUser()->id; + return \DBD\UVOTE_ACCORD_WITH_FRACTION::QA(array('spd',1)); + //return "test"; + } public static function get_users_choice_per_poll($poll_ID){ return \DBD\UVOTE_DATA_USERS_CHOICE_PER_POLL::QA(array($poll_ID));} diff --git a/uVote/page/default_page/js/loadtexts.js b/uVote/page/default_page/js/loadtexts.js index 5bc3b99..fb4b49e 100644 --- a/uVote/page/default_page/js/loadtexts.js +++ b/uVote/page/default_page/js/loadtexts.js @@ -302,17 +302,12 @@ function open_vote (poll_ID) { }); $('.c_up').click(function () { submit_commentrate($(this).attr('c_ID'), 1); - alert("Daumen hoch!"); - $('#count_up').reload(); }); $('.c_down').click(function () { submit_commentrate($(this).attr('c_ID'), 2); - alert("Daumen runter!"); - $('#count_down').reload(); }); $('.c_spam').click(function () { submit_commentrate($(this).attr('c_ID'), 3); - alert("Als Spammer gemeldet"); }); $('#test').click(function(){ $('#myModal').modal(); diff --git a/uVote/page/user_main_urVote/urvoteparties.tpl b/uVote/page/user_main_urVote/urvoteparties.tpl index f1f3b77..7780a38 100644 --- a/uVote/page/user_main_urVote/urvoteparties.tpl +++ b/uVote/page/user_main_urVote/urvoteparties.tpl @@ -4,5 +4,5 @@