OSDN Git Service

embr
[embrj/master.git] / js / list.js
index eccaa45..21bb4a3 100644 (file)
@@ -4,27 +4,35 @@ $(function(){
                if ($("#textbox").length > 0) {\r
                        onRT($(this));\r
                } else {\r
-                       $("#info_head").before('<h2>What are you doing?</h2>' + formHTML);\r
+                       $("#info_head").after('<h2>What are you doing?</h2>' + formHTML);\r
                        formFunc();\r
                        onRT($(this));\r
                }\r
        });\r
-       \r
-       $(".replie_btn").click(function(e){\r
+       $(".retw_btn").live("click", function(e){\r
+                       e.preventDefault();\r
+                       onNwRT($(this));\r
+       });\r
+       $(".rt_undo").live("click", function(e){\r
+               e.preventDefault();\r
+               onUndoRt($(this));\r
+       });\r
+       $(".replie_btn").live("click", function(e){\r
                e.preventDefault();\r
+               var replie_id = $(this).parent().parent().find(".status_word").find(".user_name").text();\r
                if ($("#textbox").length > 0) {\r
-                       onReplie($(this));\r
+                       onReplie($(this),e);\r
                } else {\r
-                       $("#info_head").before('<h2>What are you doing?</h2>' + formHTML);\r
+                       $("#info_head").after('<h2>In reply to ' + replie_id + '</h2>' + formHTML);\r
                        formFunc();\r
-                       onReplie($(this));\r
+                       onReplie($(this),e);\r
                }\r
        });\r
 \r
        $("#list_send_btn").click(function(e){\r
                e.preventDefault();\r
                if ($("#textbox").length == 0) {\r
-                       $("#info_head").before('<h2>What are you doing?</h2>' + formHTML);\r
+                       $("#info_head").after('<h2>What are you doing?</h2>' + formHTML);\r
                formFunc();\r
                }\r
        });\r
@@ -47,7 +55,7 @@ $(function(){
                        success: function(msg) {\r
                                if (msg.indexOf("success") >= 0) {\r
                                        updateSentTip("You have followed " + id + ".", 3000, "success");\r
-                                       $this.after('<a class="info_btn_hover" id="list_block_btn" href="javascript:void(0)">Unfollow</a>');\r
+                                       $this.after('<a class="info_btn_hover" id="list_block_btn" href="#">Unfollow</a>');\r
                                        $this.remove();\r
                                } else {\r
                                        updateSentTip("Failed to follow list " + id + ".", 3000, "failure");\r