don't update (and open) popup if it's already closed
This commit is contained in:
parent
d749713ef3
commit
ddddbfd87d
|
@ -1032,9 +1032,12 @@ $('body').on('click','a', function(e) {
|
||||||
// but always query the server also
|
// but always query the server also
|
||||||
getFromAPI('users/show.json?id=' + localNickname,function(data){
|
getFromAPI('users/show.json?id=' + localNickname,function(data){
|
||||||
if(data) {
|
if(data) {
|
||||||
openLocalProfileInPopup(data);
|
// update the popup if it's still open
|
||||||
remove_spinner();
|
if($('#popup-local-profile').length>0) {
|
||||||
$('.local-profile-clicked').removeClass('local-profile-clicked');
|
openLocalProfileInPopup(data);
|
||||||
|
remove_spinner();
|
||||||
|
$('.local-profile-clicked').removeClass('local-profile-clicked');
|
||||||
|
}
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
@ -1114,10 +1117,12 @@ $('body').on('click','a', function(e) {
|
||||||
|
|
||||||
if(data && data.external !== null) {
|
if(data && data.external !== null) {
|
||||||
|
|
||||||
openExternalProfileInPopup(data);
|
// update the popup if it's still open
|
||||||
remove_spinner();
|
if($('#popup-local-profile').length>0) {
|
||||||
|
openExternalProfileInPopup(data);
|
||||||
$('.external-profile-clicked').removeClass('external-profile-clicked');
|
remove_spinner();
|
||||||
|
$('.external-profile-clicked').removeClass('external-profile-clicked');
|
||||||
|
}
|
||||||
}
|
}
|
||||||
// if external lookup failed, and we don't have a cached profile card, trigger click again.
|
// if external lookup failed, and we don't have a cached profile card, trigger click again.
|
||||||
// it will not be hijacked since we don't remove the external-profile-clicked class here
|
// it will not be hijacked since we don't remove the external-profile-clicked class here
|
||||||
|
|
Loading…
Reference in New Issue
Block a user