Permalink
Browse files

Small improvement for error and warning messages

  • Loading branch information...
1 parent cdcdb5b commit 5f805ff2655ef7746f52fd9b6a9fe0cb6e359133 @cezarsa committed Jun 28, 2012
Showing with 5 additions and 4 deletions.
  1. +4 −3 lib/popup/renderer.js
  2. +1 −1 lib/twitter_lib.js
@@ -124,19 +124,20 @@ $.extend(Renderer, {
link.bind('click', function(ev) {
ev.preventDefault();
tryAgainFunction();
+ Renderer.hideMessage();
});
- msg.prepend(link);
+ msg.append(link);
}
Renderer.showMessage(msg);
},
showMessage: function(msg) {
- $("#warning .content").append(msg);
+ $("#warning .content").empty().append(msg);
$("#absolute_container").slideDown('slow');
},
- hideMessage: function(msg) {
+ hideMessage: function() {
var imgSrc = $("#warning .img_area img").attr('src');
if(imgSrc.match(/warning/)) {
tweetManager.clearWarning();
View
@@ -142,7 +142,7 @@ TwitterLib.prototype = {
fmtError = '"' + rspObj.error + '"(' + request.statusText + ')';
}
} catch(e) {
- fmtError = '"' + error + '"(' + status + ')';
+ fmtError = '"' + (error || request.statusText) + '"(' + status + ')';
}
}
callback(false, null, fmtError, context, request);

0 comments on commit 5f805ff

Please sign in to comment.