Changes

v3
Line 1: Line 1:  
(function($, ArticleComments){
 
(function($, ArticleComments){
 
"use strict";
 
"use strict";
 +
console.log("Comment Quotes v0.3");
 
 
 
function AddButtons(){
 
function AddButtons(){
 
$("#article-comments-ul .comment").each(function(){
 
$("#article-comments-ul .comment").each(function(){
$(".tools", this).prepend('<a href="#article-comments" class="quoteBtn actionButton" data-id="'+$(this).attr("id")+'">Quote.02</a>');
+
$(".tools", this).prepend('<a href="#article-comments" class="quoteBtn actionButton" data-id="'+$(this).attr("id")+'">Quote</a>');
 
});
 
});
 
 
 
$(".quoteBtn").on("click", function(){
 
$(".quoteBtn").on("click", function(){
 
var origMsg = $(".article-comm-text", $("#"+$(this).data("id"))).text();
 
var origMsg = $(".article-comm-text", $("#"+$(this).data("id"))).text();
console.log(origMsg);
+
$("#article-comm.wikiaEditor").val("> ''"+origMsg.trim()+"''");
//$("#article-comm.wikiaEditor").val("> ''"+origMsg+"''");
   
return true;
 
return true;
 
});
 
});
15

edits