ep_comments_page
Advanced tools
Comparing version 0.0.24 to 0.0.25
@@ -15,2 +15,3 @@ { | ||
"ep_comments_page.comments_template.cancel.value" : "Cancel", | ||
"ep_comments_page.comments_template.reply_input_label":"Your Reply (hit ENTER to send)", | ||
"ep_comments_page.time.seconds.past" : "{{count}} seconds ago", | ||
@@ -17,0 +18,0 @@ "ep_comments_page.time.seconds.future" : "{{count}} seconds from now", |
{ | ||
"description": "Adds comments on sidebar and link it to the text. Support for Page View, requires ep_page_view", | ||
"name": "ep_comments_page", | ||
"version": "0.0.24", | ||
"version": "0.0.25", | ||
"author": { | ||
@@ -6,0 +6,0 @@ "name": "Nicolas Lescop", |
@@ -0,1 +1,7 @@ | ||
/* TODO: | ||
- lable reply textarea | ||
- Make the chekbox appear above the suggested changes even when activated | ||
*/ | ||
var _, $, jQuery; | ||
@@ -51,3 +57,3 @@ | ||
this.findContainers(); | ||
this.insertContainers(); | ||
this.insertContainers(); // Insert comment containers in sidebar | ||
@@ -264,3 +270,3 @@ // Init icons container | ||
// TODO is this even used? | ||
// is this even used? - Yes, it is! | ||
this.container.on("submit", ".comment-reply", function(e){ | ||
@@ -276,3 +282,3 @@ e.preventDefault(); | ||
// console.warn("addCommentReplyEmit WE EXPECT REPLY ID", data); | ||
$('iframe[name="ace_outer"]').contents().find('#'+data.commentId + ' > .comment-reply > .comment-reply-input').val(""); | ||
$('iframe[name="ace_outer"]').contents().find('#'+data.commentId + ' > form.comment-reply .comment-reply-input').val(""); | ||
self.getCommentReplies(function(replies){ | ||
@@ -284,3 +290,3 @@ self.commentReplies = replies; | ||
if($(this).parent().parent().find(".reply-suggestion-checkbox").is(':checked')){ | ||
$(this).parent().parent().find(".reply-suggestion-checkbox").click(); | ||
$(this).parent().parent().find(".reply-suggestion-checkbox:clicked").click(); //Only uncheck checked boxes. TODO: is a cleanup operation. Should we do it here? | ||
} | ||
@@ -320,3 +326,3 @@ }); | ||
this.padInner = padOuter.find('iframe[name="ace_inner"]'); | ||
this.outerBody = padOuter.find('#outerdocbody') | ||
this.outerBody = padOuter.find('#outerdocbody'); | ||
}; | ||
@@ -461,3 +467,2 @@ | ||
ep_comments.prototype.collectCommentReplies = function(callback){ | ||
console.warn("collectCommentReplies", this.commentReplies); | ||
var self = this; | ||
@@ -470,2 +475,3 @@ var container = this.container; | ||
// tell comment icon that this comment has 1+ replies | ||
@@ -475,9 +481,11 @@ commentIcons.commentHasReply(commentId); | ||
var existsAlready = $('iframe[name="ace_outer"]').contents().find('#'+replyId).length; | ||
if(existsAlready) return; | ||
if(existsAlready){ | ||
return; | ||
} | ||
replies.replyId = replyId; | ||
var content = $("#replyTemplate").tmpl(replies); | ||
$('iframe[name="ace_outer"]').contents().find('#'+commentId + ' .comment-reply-input').before(content); | ||
$('iframe[name="ace_outer"]').contents().find('#'+commentId + ' .comment-reply-input-label').before(content); | ||
// Should we show "Revert" instead of "Accept" | ||
@@ -488,3 +496,2 @@ // Comment Replies ARE handled here.. | ||
} | ||
}); | ||
@@ -1036,2 +1043,7 @@ }; | ||
var leftOffset = 0; | ||
// If the line has a lineAttribute then leftOffset should be +1 | ||
var hasLineAttribute = $(span).parent("li, ul"); | ||
if(hasLineAttribute.length !== 0) leftOffset++; | ||
$(span).prevAll("span").each(function(){ | ||
@@ -1049,2 +1061,1 @@ var spanOffset = $(this).text().length; | ||
} | ||
Sorry, the diff of this file is not supported yet
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
143892
3291