From oi-commits at pardus.org.tr Mon Sep 1 04:10:06 2008 From: oi-commits at pardus.org.tr (oi-commits at pardus.org.tr) Date: Mon, 1 Sep 2008 04:10:06 +0300 (EEST) Subject: [Oi-commits] r1754 - in branches/newdesign: ideas/templates media/css/new media/js Message-ID: <20080901011006.D2F13138411B@liste.pardus.org.tr> Author: huseyin.berberoglu Date: Mon Sep 1 04:10:06 2008 New Revision: 1754 Modified: branches/newdesign/ideas/templates/idea_list.html branches/newdesign/media/css/new/brainstorm.css branches/newdesign/media/js/brainstorm.js Log: vote button works true now. Modified: branches/newdesign/ideas/templates/idea_list.html ================================================================= --- branches/newdesign/ideas/templates/idea_list.html (original) +++ branches/newdesign/ideas/templates/idea_list.html Mon Sep 1 04:10:06 2008 @@ -17,28 +17,12 @@ {% for idea in ideas %}
-
- {% ifequal idea.user_vote 1 %} - oylama - {% else %} - {% ifequal idea.user_vote 0 %} - oylama - {% else %} - oylama - {% endifequal %} - {% endifequal %} +
+
{{ idea.vote_count }}
- {% ifequal idea.user_vote 0 %} - oylama - {% else %} - {% ifequal idea.user_vote 1 %} - oylama - {% else %} - oylama - {% endifequal %} - {% endifequal %} +
Modified: branches/newdesign/media/css/new/brainstorm.css ================================================================= --- branches/newdesign/media/css/new/brainstorm.css (original) +++ branches/newdesign/media/css/new/brainstorm.css Mon Sep 1 04:10:06 2008 @@ -121,3 +121,6 @@ color: #666; text-decoration: none; } +.cursor_default { + cursor: default; +} Modified: branches/newdesign/media/js/brainstorm.js ================================================================= --- branches/newdesign/media/js/brainstorm.js (original) +++ branches/newdesign/media/js/brainstorm.js Mon Sep 1 04:10:06 2008 @@ -13,18 +13,32 @@ }); } function oyla(id, vote) { - $.get("/yenifikir/oyla/" + id + "/" + vote + "/", - function(data) { - $('#oyla' + id).hide() - if (data.substr(0,2) == "OK") { - data = data.replace(/OK/, "") - $('#vote' + id).html(data); - $("#img_" + id + "_" + vote).parent().attr("href", 'test') - $("#img_" + id + "_" + vote).attr("src", "/media/img/new/ideas_voted_" + vote + ".png"); - } else { - document.location = '/kullanici/giris/'; - } - }); + img = $('#img_' + id + '_' + vote); + if (img.hasClass("voted")) { + img.removeClass("voted"); + img.attr("src", "/media/img/new/ideas_vote_" + vote + ".png"); + oyiptal(id, vote); + if (vote == 1) { vote = 0; } else { vote = 1; } + $('#img_' + id + '_' + vote).removeClass("cursor_default"); + $('#img_' + id + '_' + vote).attr("disabled",""); + } else { + img.addClass("voted"); + $.get("/yenifikir/oyla/" + id + "/" + vote + "/", + function(data) { + $('#oyla' + id).hide() + if (data.substr(0,2) == "OK") { + data = data.replace(/OK/, "") + $('#vote' + id).html(data); + img.parent().attr("href", 'test') + img.attr("src", "/media/img/new/ideas_voted_" + vote + ".png"); + if (vote == 1) { vote = 0; } else { vote = 1; } + $('#img_' + id + '_' + vote).addClass("cursor_default"); + $('#img_' + id + '_' + vote).attr("disabled","disabled"); + } else { + document.location = '/kullanici/giris/'; + } + }); + } } function oyiptal(id, vote) { $.get("/yenifikir/oyiptal/" + id, From oi-commits at pardus.org.tr Mon Sep 1 13:40:14 2008 From: oi-commits at pardus.org.tr (oi-commits at pardus.org.tr) Date: Mon, 1 Sep 2008 13:40:14 +0300 (EEST) Subject: [Oi-commits] r1755 - in branches/newdesign: media/css/new templates/feedjack/oi Message-ID: <20080901104014.6BC6F1384169@liste.pardus.org.tr> Author: jnmbk Date: Mon Sep 1 13:40:14 2008 New Revision: 1755 Added: branches/newdesign/media/css/new/planet.css Modified: branches/newdesign/templates/feedjack/oi/post_list.html Log: planet authors Modified: branches/newdesign/templates/feedjack/oi/post_list.html ================================================================= --- branches/newdesign/templates/feedjack/oi/post_list.html (original) +++ branches/newdesign/templates/feedjack/oi/post_list.html Mon Sep 1 13:40:14 2008 @@ -1,8 +1,8 @@ {% extends "base.html" %} {% block title %}Pardus D?nyas? - {% endblock %} {% block extrahead %} - + {% endblock %}} {% block content %} {% for item in object_list %} @@ -32,67 +32,40 @@ {% endfor %} {% endblock %} -{% block sidebar %} - - -