diff -r 6c2ef083d89f -r fda73ac53450 src/cm/media/js/client/c_icomment.js
--- a/src/cm/media/js/client/c_icomment.js Mon Mar 10 13:04:40 2014 +0100
+++ b/src/cm/media/js/client/c_icomment.js Mon Mar 10 13:24:19 2014 +0100
@@ -75,19 +75,19 @@
});
// CY.on won't work
- this.overlay.get('contentBox').query(".c-close").on("click", this.onCloseCommentClick, this);
- this.overlay.get('contentBox').query(".c-moderate").on("click", this.onModerateCommentClick, this);
- this.overlay.get('contentBox').query(".c-state-pending").on("click", this.onPendingCommentClick, this);
- this.overlay.get('contentBox').query(".c-state-approved").on("click", this.onApprovedCommentClick, this);
- this.overlay.get('contentBox').query(".c-state-unapproved").on("click", this.onUnapprovedCommentClick, this);
- this.overlay.get('contentBox').query(".c-state-cancel").on("click", this.onCancelStateChangeClick, this);
- this.overlay.get('contentBox').query(".c-edit").on("click", this.onEditCommentClick, this);
- this.overlay.get('contentBox').query(".c-delete").on("click", this.onDeleteCommentClick, this);
- this.overlay.get('contentBox').query(".c-reply").on("click", this.onReplyCommentClick, this);
- this.overlay.get('contentBox').query(".c-readreplies").on("click", this.onReadRepliesCommentClick, this);
+ this.overlay.get('contentBox').one(".c-close").on("click", this.onCloseCommentClick, this);
+ this.overlay.get('contentBox').one(".c-moderate").on("click", this.onModerateCommentClick, this);
+ this.overlay.get('contentBox').one(".c-state-pending").on("click", this.onPendingCommentClick, this);
+ this.overlay.get('contentBox').one(".c-state-approved").on("click", this.onApprovedCommentClick, this);
+ this.overlay.get('contentBox').one(".c-state-unapproved").on("click", this.onUnapprovedCommentClick, this);
+ this.overlay.get('contentBox').one(".c-state-cancel").on("click", this.onCancelStateChangeClick, this);
+ this.overlay.get('contentBox').one(".c-edit").on("click", this.onEditCommentClick, this);
+ this.overlay.get('contentBox').one(".c-delete").on("click", this.onDeleteCommentClick, this);
+ this.overlay.get('contentBox').one(".c-reply").on("click", this.onReplyCommentClick, this);
+ this.overlay.get('contentBox').one(".c-readreplies").on("click", this.onReadRepliesCommentClick, this);
- this.overlay.get('contentBox').query(".icomment-header").on("mouseenter", this.onMouseEnterHeader, this);
- this.overlay.get('contentBox').query(".icomment-header").on("mouseleave", this.onMouseLeaveHeader, this);
+ this.overlay.get('contentBox').one(".icomment-header").on("mouseenter", this.onMouseEnterHeader, this);
+ this.overlay.get('contentBox').one(".icomment-header").on("mouseleave", this.onMouseLeaveHeader, this);
this.overlay.get('contentBox').on("click", this.onCommentClick, this);
}
@@ -105,8 +105,8 @@
onModerateCommentClick : function (e) {
e.halt() ; // prevent click triggered on content box
if (readyForAction() && this.isVisible()) {
- this.overlay.get('contentBox').query(".c-iactions").addClass("displaynone") ;
- this.overlay.get('contentBox').query(".c-state-actions").removeClass("displaynone") ;
+ this.overlay.get('contentBox').one(".c-iactions").addClass("displaynone") ;
+ this.overlay.get('contentBox').one(".c-state-actions").removeClass("displaynone") ;
}
},
onPendingCommentClick : function (e) {
@@ -130,8 +130,8 @@
onCancelStateChangeClick : function (e) {
e.halt() ; // prevent click triggered on content box
if (readyForAction() && this.isVisible()) {
- this.overlay.get('contentBox').query(".c-iactions").removeClass("displaynone") ;
- this.overlay.get('contentBox').query(".c-state-actions").addClass("displaynone") ;
+ this.overlay.get('contentBox').one(".c-iactions").removeClass("displaynone") ;
+ this.overlay.get('contentBox').one(".c-state-actions").addClass("displaynone") ;
}
},
onDeleteCommentClick : function (e) {
@@ -199,13 +199,13 @@
onMouseEnterHeader : function () {
if (readyForAction() && this.isVisible()) {
- this.overlay.get('contentBox').query(".c-permalink").removeClass('displaynone');
+ this.overlay.get('contentBox').one(".c-permalink").removeClass('displaynone');
}
},
onMouseLeaveHeader : function () {
if (readyForAction() && this.isVisible()) {
- this.overlay.get('contentBox').query(".c-permalink").addClass('displaynone');
+ this.overlay.get('contentBox').one(".c-permalink").addClass('displaynone');
}
},
@@ -239,12 +239,12 @@
}
},
hideContent:function() {
- this.overlay.get('contentBox').query(".icomment-header").addClass('displaynone') ;
- this.overlay.get('contentBox').query(".icomment-body").addClass('displaynone') ;
+ this.overlay.get('contentBox').one(".icomment-header").addClass('displaynone') ;
+ this.overlay.get('contentBox').one(".icomment-body").addClass('displaynone') ;
},
showContent:function() {
- this.overlay.get('contentBox').query(".icomment-header").removeClass('displaynone') ;
- this.overlay.get('contentBox').query(".icomment-body").removeClass('displaynone') ;
+ this.overlay.get('contentBox').one(".icomment-header").removeClass('displaynone') ;
+ this.overlay.get('contentBox').one(".icomment-body").removeClass('displaynone') ;
},
isVisible:function() {
return this.overlay.get('visible') ;
@@ -254,13 +254,13 @@
return this.overlay.show() ;
},
showReadRepliesLnk:function() {
- this.overlay.get('contentBox').query(".c-readreplies").removeClass('displaynone') ;
+ this.overlay.get('contentBox').one(".c-readreplies").removeClass('displaynone') ;
},
hideReadRepliesLnk:function() {
- this.overlay.get('contentBox').query(".c-readreplies").addClass('displaynone') ;
+ this.overlay.get('contentBox').one(".c-readreplies").addClass('displaynone') ;
},
changeModeration:function(comment) {
- var moderationLnk = this.overlay.get('contentBox').query(".c-moderate") ;
+ var moderationLnk = this.overlay.get('contentBox').one(".c-moderate") ;
moderationLnk.set("innerHTML", gettext(comment.state)) ;
moderationLnk.removeClass("c-state-approved") ;
@@ -268,8 +268,8 @@
moderationLnk.removeClass("c-state-unapproved") ;
moderationLnk.addClass("c-state-" + comment.state) ;
- this.overlay.get('contentBox').query(".c-iactions").removeClass("displaynone") ;
- this.overlay.get('contentBox').query(".c-state-actions").addClass("displaynone") ;
+ this.overlay.get('contentBox').one(".c-iactions").removeClass("displaynone") ;
+ this.overlay.get('contentBox').one(".c-state-actions").addClass("displaynone") ;
},
isfetched : function() {
return (this.commentId != null) ;
@@ -309,17 +309,17 @@
var newTitleContent = '