diff --git a/rhodecode/model/changeset_status.py b/rhodecode/model/changeset_status.py --- a/rhodecode/model/changeset_status.py +++ b/rhodecode/model/changeset_status.py @@ -212,10 +212,10 @@ class ChangesetStatusModel(BaseModel): # TODO(marcink): with group voting, how does rejected work, # do we ever get rejected state ? - if approved_votes_count == reviewers_number: + if approved_votes_count and (approved_votes_count == reviewers_number): return ChangesetStatus.STATUS_APPROVED - if rejected_votes_count == reviewers_number: + if rejected_votes_count and (rejected_votes_count == reviewers_number): return ChangesetStatus.STATUS_REJECTED return ChangesetStatus.STATUS_UNDER_REVIEW diff --git a/rhodecode/model/db.py b/rhodecode/model/db.py --- a/rhodecode/model/db.py +++ b/rhodecode/model/db.py @@ -3866,7 +3866,9 @@ class ChangesetComment(Base, BaseModel): @property def is_inline(self): - return self.line_no and self.f_path + if self.line_no and self.f_path: + return True + return False @property def last_version(self): diff --git a/rhodecode/public/js/src/rhodecode.js b/rhodecode/public/js/src/rhodecode.js --- a/rhodecode/public/js/src/rhodecode.js +++ b/rhodecode/public/js/src/rhodecode.js @@ -296,16 +296,25 @@ var tooltipActivate = function () { // we set a variable so the data is only loaded once via Ajax, not every time the tooltip opens if ($origin.data('loaded') !== true) { var hovercardUrl = $origin.data('hovercardUrl'); - var altHovercard =$origin.data('hovercardAlt'); + var altHovercard = $origin.data('hovercardAlt'); if (hovercardUrl !== undefined && hovercardUrl !== "") { - if (hovercardUrl.substr(0,12) === 'pyroutes.url'){ + var urlLoad = true; + if (hovercardUrl.substr(0, 12) === 'pyroutes.url') { hovercardUrl = eval(hovercardUrl) + } else if (hovercardUrl.substr(0, 11) === 'javascript:') { + var jsFunc = hovercardUrl.substr(11); + urlLoad = false; + loaded = true; + instance.content(eval(jsFunc)) } - var loaded = loadHoverCard(hovercardUrl, altHovercard, function (data) { - instance.content(data); - }) + if (urlLoad) { + var loaded = loadHoverCard(hovercardUrl, altHovercard, function (data) { + instance.content(data); + }) + } + } else { if ($origin.data('hovercardAltHtml')) { var data = atob($origin.data('hovercardAltHtml')); diff --git a/rhodecode/templates/base/sidebar.mako b/rhodecode/templates/base/sidebar.mako --- a/rhodecode/templates/base/sidebar.mako +++ b/rhodecode/templates/base/sidebar.mako @@ -84,34 +84,35 @@
${h.chop_at_smart(comment_obj.text, '\n', suffix_if_chopped='...')}
+