aboutsummaryrefslogtreecommitdiffstats
path: root/97suifangqa/apps/indicator/static/javascripts/delete_card_tip.js
diff options
context:
space:
mode:
Diffstat (limited to '97suifangqa/apps/indicator/static/javascripts/delete_card_tip.js')
-rw-r--r--97suifangqa/apps/indicator/static/javascripts/delete_card_tip.js26
1 files changed, 20 insertions, 6 deletions
diff --git a/97suifangqa/apps/indicator/static/javascripts/delete_card_tip.js b/97suifangqa/apps/indicator/static/javascripts/delete_card_tip.js
index 099a216..9365d46 100644
--- a/97suifangqa/apps/indicator/static/javascripts/delete_card_tip.js
+++ b/97suifangqa/apps/indicator/static/javascripts/delete_card_tip.js
@@ -1,4 +1,7 @@
+// global js var: card_2_delete_id (type: string)
+
$(document).ready(function(){
+// console.log(parent.card_2_delete_id); //要取消关注的 卡片id 的获取方法
//点大叉、继续关注按钮,关闭弹层页面
$(".delete_card_tip_close, .action_confirm_ignore").bind("click", function(){
parent.TB_remove();
@@ -7,12 +10,23 @@ $(document).ready(function(){
//取消关注,关闭弹层页面
$(".action_confirm_cancel").bind("click", function(){
- //TODO
- //底层数据层取消关注(ajax)
- //console.log(parent.card_2_delete_id); //要取消关注的 卡片id 的获取方法
+ // ajax process to unfollow the indicator
+ // indicator_id -> parseInt(parent.card_2_delete_id)
+ // 底层数据层取消关注(ajax)
+ var date = new Date();
+ var time = date.getTime();
+ $.ajax({
+ type: 'get',
+ url: parent.indicator_url + 'ajax/unfollow_indicator',
+ data: 'indicator_id='+parent.card_2_delete_id+'&time='+time,
+ success: function(data) {
+ if (data == 'success') {
+ parent.delete_card();
+ parent.TB_remove();
+ }
+ },
+ });
- parent.delete_card();
- parent.TB_remove();
return false;
});
-}); \ No newline at end of file
+});