Refactored geo location removal to removeNoticeDataGeo()

This commit is contained in:
Sarven Capadisli 2010-01-04 10:07:32 +00:00
parent fe8927a42c
commit ad323575e6
1 changed files with 11 additions and 12 deletions

View File

@ -535,23 +535,13 @@ var SN = { // StatusNet
function(error) {
if (error.PERMISSION_DENIED == 1) {
$('label[for='+SN.C.S.NoticeDataGeo+']').removeClass('checked');
NDGS.hide();
$('#'+SN.C.S.NoticeLat).val('');
$('#'+SN.C.S.NoticeLon).val('');
$('#'+SN.C.S.NoticeLocationNs).val('');
$('#'+SN.C.S.NoticeLocationId).val('');
removeNoticeDataGeo();
}
}
);
}
else {
$('label[for='+SN.C.S.NoticeDataGeo+']').removeClass('checked');
NDGS.hide();
$('#'+SN.C.S.NoticeLat).val('');
$('#'+SN.C.S.NoticeLon).val('');
$('#'+SN.C.S.NoticeLocationNs).val('');
$('#'+SN.C.S.NoticeLocationId).val('');
removeNoticeDataGeo();
}
});
@ -560,6 +550,15 @@ var SN = { // StatusNet
NDG.change();
}
}
function removeNoticeDataGeo() {
$('label[for='+SN.C.S.NoticeDataGeo+']').removeClass('checked');
$('#'+SN.C.S.NoticeDataGeoSelected).hide();
$('#'+SN.C.S.NoticeLat).val('');
$('#'+SN.C.S.NoticeLon).val('');
$('#'+SN.C.S.NoticeLocationNs).val('');
$('#'+SN.C.S.NoticeLocationId).val('');
}
},
NewDirectMessage: function() {