Skip to content
Browse files

add title attribute to favorite headers which shows full header value…

…s on mouse over
  • Loading branch information...
1 parent 9ddc9f5 commit 06206ea8e057a627edb63929191fd482a93fcabb Senthil Kumar committed Jul 2, 2012
Showing with 3 additions and 2 deletions.
  1. +3 −2 content/js/restclient.main.js
View
5 content/js/restclient.main.js
@@ -847,10 +847,11 @@ restclient.main = {
favoriteHeaders = JSON.parse(favoriteHeaders);
for(var i=0, header; header = favoriteHeaders[i]; i++) {
var text = header[0] + ": " + header[1];
+ var croppedText = text;
if (text.length > restclient.main.headerMenuMaxLength)
- text = text.substr(0, restclient.main.headerMenuMaxLength -3) + "...";
- var a = $('<a class="favorite" href="#"></a>').text(text)
+ croppedText = text.substr(0, restclient.main.headerMenuMaxLength -3) + "...";
+ var a = $('<a class="favorite" href="#" title='+text+'></a>').text(croppedText)
.attr('header-name', header[0])
.attr('header-value', header[1]);
$('.custom-header').after($('<li></li>').append(a));

0 comments on commit 06206ea

Please sign in to comment.
Something went wrong with that request. Please try again.