Skip to content

Commit

Permalink
tooltip for theme badge, fix #84
Browse files Browse the repository at this point in the history
  • Loading branch information
Oleksandr Bardanov committed Sep 8, 2014
1 parent e36b211 commit b7898ce
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 6 deletions.
12 changes: 7 additions & 5 deletions extension/achievements/theme.js
Original file line number Diff line number Diff line change
Expand Up @@ -23,21 +23,23 @@ define(function(require, exports, module){
}

this.getTag = function(type, element){
var badge = null;
var badge = null, color;

if (type === 'dark'){
//TODO: change to dark icon
badge = dark;
color = 'colorDark';
} else if (type === 'light'){
//TODO: change to light icon
badge = light;
color = 'colorLight';
} else {
badge = image;
color = '';
}

return _.template('<span title="${title}" class="ext-badge ext-badge-theme"><img src="${badge}" /></span>',{
return _.template('<span title="${title}${color}" class="ext-badge ext-badge-theme"><img src="${badge}" /></span>',{
badge: badge,
title: locale.get('themeTitle')
title: locale.get('themeTitle'),
color: color ? '(' + locale.get(color) + ')' : ''
});
}
}
Expand Down
6 changes: 5 additions & 1 deletion extension/locale/en-US.js
Original file line number Diff line number Diff line change
Expand Up @@ -54,6 +54,10 @@ define(function (require, exports, module){
versionTemplate: '<div>v ${version} from ${date} - ${downloads} downloads</div>',

//... and ## more versions
moreVersionsTemplate: '<div>... and ${count} more versions</div>'
moreVersionsTemplate: '<div>... and ${count} more versions</div>',

//0.5.4
colorDark: 'dark',
colorLight: 'light'
}
});

0 comments on commit b7898ce

Please sign in to comment.