Separated NoticeFavor and calling it from FormNoticeXHR success

This commit is contained in:
Sarven Capadisli 2009-11-13 20:56:55 +00:00
parent 9a2a01c51e
commit dedacbe66b
1 changed files with 7 additions and 2 deletions

View File

@ -228,6 +228,7 @@ var SN = { // StatusNet
$('#'+notice.id).fadeIn(2500); $('#'+notice.id).fadeIn(2500);
SN.U.NoticeAttachments(); SN.U.NoticeAttachments();
SN.U.NoticeReply(); SN.U.NoticeReply();
SN.U.NoticeFavor();
} }
} }
$('#'+form_id+' #'+SN.C.S.NoticeDataText).val(''); $('#'+form_id+' #'+SN.C.S.NoticeDataText).val('');
@ -276,6 +277,11 @@ var SN = { // StatusNet
return true; return true;
}, },
NoticeFavor: function() {
$('.form_favor').each(function() { SN.U.FormXHR($(this)); });
$('.form_disfavor').each(function() { SN.U.FormXHR($(this)); });
},
NoticeAttachments: function() { NoticeAttachments: function() {
$.fn.jOverlay.options = { $.fn.jOverlay.options = {
method : 'GET', method : 'GET',
@ -386,8 +392,7 @@ var SN = { // StatusNet
Notices: function() { Notices: function() {
if ($('body.user_in').length > 0) { if ($('body.user_in').length > 0) {
$('.form_favor').each(function() { SN.U.FormXHR($(this)); }); SN.U.NoticeFavor();
$('.form_disfavor').each(function() { SN.U.FormXHR($(this)); });
SN.U.NoticeReply(); SN.U.NoticeReply();
} }