summaryrefslogtreecommitdiff
path: root/js/cloud_comments.js
diff options
context:
space:
mode:
Diffstat (limited to 'js/cloud_comments.js')
-rw-r--r--js/cloud_comments.js27
1 files changed, 23 insertions, 4 deletions
diff --git a/js/cloud_comments.js b/js/cloud_comments.js
index 9f4c2ad..59523d4 100644
--- a/js/cloud_comments.js
+++ b/js/cloud_comments.js
@@ -1,10 +1,29 @@
$(document).ready(function(){
- $(".feedback a").click(function(){
+ /* to avoid CKE partial loading... */
+ $('.form-wrapper').slideToggle();
+
+ /* reply button action */
+ $(".btn-reply a").click(function(){
var clicked = $(this).attr("class");
- console.log(clicked);
$('#'+clicked).slideToggle();
+ console.log($(this).html());
+ if ($(this).html() == "Reply") {
+ $(this).html("Close");
+ } else {
+ $(this).html("Reply");
+ }
});
- /* to avoid CKE partial loading... */
- $('.form-wrapper').slideToggle();
+ /* delete link */
+ $(".delete").click(function(e){
+ sure = confirm("Are you sure ?");
+ console.log(sure);
+ if (sure) {
+ window.location.href = $(this).attr("href");
+ }
+ else {
+ console.log("nopees");
+ }
+ e.preventDefault();
+ });
});