Skip to content

Commit

Permalink
Handle AJAX-level profile loading failure.
Browse files Browse the repository at this point in the history
  • Loading branch information
icculus committed Jul 5, 2010
1 parent d8f0907 commit 7258807
Show file tree
Hide file tree
Showing 2 changed files with 24 additions and 7 deletions.
19 changes: 12 additions & 7 deletions index.html
Expand Up @@ -397,13 +397,7 @@
type: "GET",
url: "steamprofile.php",
dataType: "xml",
error: function(XMLHttpRequest, textStatus, errorThrown) {
var html = "<center><font color='#FF0000'>" +
"Failed to load Steam profile: " +
textStatus + " " + errorThrown +
"</font></center>";
$('div.content').html(html);
},
error: function() { popover('#loginfailurepopover'); },
success: function(xml) {
profile = process_steam_profile(xml);
render();
Expand Down Expand Up @@ -465,6 +459,17 @@
</center>
</div>

<div id='loginfailurepopover'>
<center>
<p>We're having trouble accessing your Steam Community profile.</p>
<br/>
<p>This is probably a temporary network glitch. Please try again later.</p>
<br/>
<p><a style='text-decoration: underline;' href='http://store.steampowered.com/'>
Click here to shop for games on Steam in the meantime.</a></p>
</center>
</div>

<div id='privateprofilepopover'>
<center>
<p>Your Steam Community profile appears to be set to private.</p>
Expand Down
12 changes: 12 additions & 0 deletions style.css
Expand Up @@ -129,6 +129,18 @@ img.avatar {
font-size:13px;
}

#loginfailurepopover {
display:none;
position:fixed;
_position:absolute; /* hack for internet explorer 6*/
background:#FF0000;
color:#FFFFFF;
border:2px solid #cecece;
z-index:2;
padding:12px;
font-size:13px;
}

#privateprofilepopover {
display:none;
position:fixed;
Expand Down

0 comments on commit 7258807

Please sign in to comment.