summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--askbot/models/__init__.py7
-rw-r--r--askbot/skins/common/media/js/post.js10
2 files changed, 9 insertions, 8 deletions
diff --git a/askbot/models/__init__.py b/askbot/models/__init__.py
index 6a609923..16b43dcd 100644
--- a/askbot/models/__init__.py
+++ b/askbot/models/__init__.py
@@ -345,8 +345,11 @@ def user_assert_can_unaccept_best_answer(self, answer = None):
return # success
elif self.is_administrator() or self.is_moderator():
- will_be_able_at = (answer.added_at +
- datetime.timedelta(days=askbot_settings.MIN_DAYS_FOR_STAFF_TO_ACCEPT_ANSWER))
+ will_be_able_at = (
+ answer.added_at +
+ datetime.timedelta(
+ days=askbot_settings.MIN_DAYS_FOR_STAFF_TO_ACCEPT_ANSWER)
+ )
if datetime.datetime.now() < will_be_able_at:
error_message = _(
diff --git a/askbot/skins/common/media/js/post.js b/askbot/skins/common/media/js/post.js
index 5dc49080..e35608fa 100644
--- a/askbot/skins/common/media/js/post.js
+++ b/askbot/skins/common/media/js/post.js
@@ -402,12 +402,10 @@ var Vote = function(){
var bindEvents = function(){
// accept answers
- if(questionAuthorId == currentUserId){
- var acceptedButtons = 'div.'+ voteContainerId +' img[id^='+ imgIdPrefixAccept +']';
- $(acceptedButtons).unbind('click').click(function(event){
- Vote.accept($(event.target));
- });
- }
+ var acceptedButtons = 'div.'+ voteContainerId +' img[id^='+ imgIdPrefixAccept +']';
+ $(acceptedButtons).unbind('click').click(function(event){
+ Vote.accept($(event.target));
+ });
// set favorite question
var favoriteButton = getFavoriteButton();
favoriteButton.unbind('click').click(function(event){