summaryrefslogtreecommitdiff
path: root/js
diff options
context:
space:
mode:
authorJayaram Pai2013-11-24 12:28:34 +0530
committerJayaram Pai2013-11-24 12:28:34 +0530
commit265e6a621ed3a171c0672866105b92c61678c0dc (patch)
treec032a8407fc8a83648df6d7d12bbf1e8b9ccc29b /js
parentfce5d489e1e90cb0ca58b54e249ec72eef00e86a (diff)
downloadcloud-comments-265e6a621ed3a171c0672866105b92c61678c0dc.tar.gz
cloud-comments-265e6a621ed3a171c0672866105b92c61678c0dc.tar.bz2
cloud-comments-265e6a621ed3a171c0672866105b92c61678c0dc.zip
adding timestamp, dynamic emails
Diffstat (limited to '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();
+ });
});