2 $(".rank_img img").tipsy({gravity: 's'});
\r
3 $(".rank_img img").live("click", function (e) {
\r
4 $(".right_menu").hide();
\r
5 $(this).parent().parent().parent().find(".right_menu").css("display", "block");
\r
8 $('body').click(function () {
\r
9 $(".right_menu").hide();
\r
11 $('.status_author li a').click(function () {
\r
12 $(".right_menu").hide();
\r
14 $(".ul_mention").live("click", function (e) {
\r
16 ulmention($(this), e);
\r
18 $(".ul_dm").live("click", function (e) {
\r
22 $(".ul_follow").live("click", function (e) {
\r
24 var $this = $(this);
\r
25 var id = $this.parent().parent().parent().find(".rank_screenname").text();
\r
26 updateSentTip("Following " + id + "...", 5000, "ing");
\r
28 url: "ajax/relation.php",
\r
30 data: "action=create&id=" + id,
\r
31 success: function (msg) {
\r
32 if (msg.indexOf("success") >= 0) {
\r
33 $this.parent().parent().parent().addClass("reply");
\r
34 updateSentTip("You have followed " + id + "!", 3000, "success");
\r
36 updateSentTip("Failed to follow " + id + ", please try again.", 3000, "failure");
\r
39 error: function (msg) {
\r
40 updateSentTip("Failed to follow " + id + ", please try again.", 3000, "failure");
\r
44 $(".ul_unfollow").live("click", function (e) {
\r
46 var $this = $(this);
\r
47 var id = $this.parent().parent().parent().find(".rank_screenname").text();
\r
48 if (confirm("Are you sure to unfollow " + id + " ?")) {
\r
49 updateSentTip("Unfollowing " + id + "...", 5000, "ing");
\r
51 url: "ajax/relation.php",
\r
53 data: "action=destory&id=" + id,
\r
54 success: function (msg) {
\r
55 if (msg.indexOf("success") >= 0) {
\r
56 $this.parent().parent().parent().addClass("filter");
\r
57 updateSentTip("You have unfollowed " + id + "!", 3000, "success");
\r
59 updateSentTip("Failed to unfollow " + id + ", please try again.", 3000, "failure");
\r
62 error: function (msg) {
\r
63 updateSentTip("Failed to unfollow " + id + ", please try again.", 3000, "failure");
\r
68 $(".ul_block").live("click", function (e) {
\r
70 var $this = $(this);
\r
71 var id = $this.parent().parent().parent().find(".rank_screenname").text();
\r
72 if (confirm("Are you sure to block " + id + " ?")) {
\r
73 updateSentTip("Blocking " + id + "...", 5000, "ing");
\r
75 url: "ajax/relation.php",
\r
77 data: "action=block&id=" + id,
\r
78 success: function (msg) {
\r
79 if (msg.indexOf("success") >= 0) {
\r
80 $this.parent().parent().parent().fadeOut("normal");
\r
81 updateSentTip("You have blocked " + id + "!", 3000, "success");
\r
83 updateSentTip("Failed to block " + id + ", please try again.", 3000, "failure");
\r
86 error: function (msg) {
\r
87 updateSentTip("Failed to block " + id + ", please try again.", 3000, "failure");
\r
93 $(".ul_spam").live("click", function (e) {
\r
95 var $this = $(this);
\r
96 var id = $this.parent().parent().parent().find(".rank_screenname").text();
\r
97 if (confirm("Are you sure to report " + id + " ?")) {
\r
98 updateSentTip("Reporting " + id + " as a spammer...", 5000, "ing");
\r
100 url: "ajax/reportSpam.php",
\r
102 data: "spammer=" + id,
\r
103 success: function (msg) {
\r
104 if (msg.indexOf("success") >= 0) {
\r
105 $this.parent().parent().parent().fadeOut("normal");
\r
106 updateSentTip("Successfully reported!", 3000, "success");
\r
108 updateSentTip("Failed to report " + id + ", please try again.", 3000, "failure");
\r
111 error: function (msg) {
\r
112 updateSentTip("Failed to report " + id + ", please try again.", 3000, "failure");
\r
117 function ulmention($this, e) {
\r
118 var replie_id = $this.parent().parent().parent().find(".rank_screenname").text();
\r
119 if ($("#textbox").length > 0) {
\r
120 var text = "@" + replie_id;
\r
122 $("#textbox").focus();
\r
123 $("#textbox").val($("#textbox").val() + text + ' ');
\r
126 $("#statuses h2").before('<h2>Mention</h2>' + formHTML);
\r
128 var text = "@" + replie_id;
\r
130 $("#textbox").focus();
\r
131 $("#textbox").val($("#textbox").val() + text + ' ');
\r
135 function uldm($this, e) {
\r
136 var replie_id = $this.parent().parent().parent().find(".rank_screenname").text();
\r
137 if ($("#textbox").length > 0) {
\r
138 var text = "D " + replie_id;
\r
140 $("#textbox").focus();
\r
141 $("#textbox").val($("#textbox").val() + text + ' ');
\r
144 $("#statuses h2").before('<h2>Send direct message</h2>' + formHTML);
\r
146 var text = "D " + replie_id;
\r
148 $("#textbox").focus();
\r
149 $("#textbox").val($("#textbox").val() + text + ' ');
\r