# HG changeset patch
# User gibus
# Date 1318510277 -7200
# Node ID eecda8559c1da032b49edf488f7b9b690561c7d8
# Parent ba81ba3ed3a0cafd75d40c3e82434c42961b6b14
Allow permalink on comments even when embedfing iframe.
diff -r ba81ba3ed3a0 -r eecda8559c1d src/cm/media/js/client/c_icomment.js
--- a/src/cm/media/js/client/c_icomment.js Sat Sep 10 21:55:14 2011 +0200
+++ b/src/cm/media/js/client/c_icomment.js Thu Oct 13 14:51:17 2011 +0200
@@ -198,13 +198,13 @@
},
onMouseEnterHeader : function () {
- if (readyForAction() && this.isVisible() && (sv_prefix=="")) {
+ if (readyForAction() && this.isVisible()) {
this.overlay.get('contentBox').query(".c-permalink").removeClass('displaynone');
}
},
onMouseLeaveHeader : function () {
- if (readyForAction() && this.isVisible() && (sv_prefix=="")) {
+ if (readyForAction() && this.isVisible()) {
this.overlay.get('contentBox').query(".c-permalink").addClass('displaynone');
}
},
@@ -302,10 +302,7 @@
var modifDateTooltip = (comment.modified == comment.created) ? '' : ' * ' ;
var permaTitle = gettext('Permalink to this comment') ;
- var permalink = "";
- if (sv_prefix=="") {
- permalink = '¶ ' ;
- }
+ var permalink = '¶ ' ;
var infos = interpolate(gettext('by %(name)s, created on %(date)s'),{'name':comment.name, 'date':comment.created_user_str}, true) ;
@@ -341,6 +338,9 @@
if (sv_prefix=="") {
boundingBoxNode.query(".c-permalink").set("href",sv_site_url + comment.permalink) ;
}
+ else {
+ boundingBoxNode.query(".c-permalink").set("href", top.location.href + '?comment_id_key=' + comment.id_key) ;
+ }
// MODERATION
this.changeModeration(comment) ;