improve home screen logo tooltips (positioning, localization)

This commit is contained in:
rolux 2013-08-04 20:35:58 +00:00
parent f342e9ec84
commit 26b8357da9
3 changed files with 20 additions and 6 deletions

View file

@ -47,7 +47,12 @@ pandora.ui.home = function() {
}) })
.appendTo(that), .appendTo(that),
$logo = $('<img>') $logo = Ox.Element({
element: '<img>',
tooltip: function() {
return Ox._('Enter {0}', [pandora.site.site.name]);
}
})
.addClass('logo') .addClass('logo')
.attr({ .attr({
id: 'logo', id: 'logo',
@ -63,8 +68,8 @@ pandora.ui.home = function() {
margin: 'auto', margin: 'auto',
cursor: 'pointer' cursor: 'pointer'
}) })
.on({ .bindEvent({
click: function() { anyclick: function() {
$browseButton.triggerEvent('click'); $browseButton.triggerEvent('click');
} }
}) })
@ -273,6 +278,7 @@ pandora.ui.home = function() {
}; };
that.fadeOutScreen = function() { that.fadeOutScreen = function() {
$('.OxTooltip').remove();
that.find(':not(#logo)').hide(); that.find(':not(#logo)').hide();
$logo.animate({width: window.innerWidth + 'px'}, 500); $logo.animate({width: window.innerWidth + 'px'}, 500);
that.animate({opacity: 0}, 500, function() { that.animate({opacity: 0}, 500, function() {

View file

@ -59,7 +59,9 @@ pandora.ui.home = function() {
$logo = Ox.Element({ $logo = Ox.Element({
element: '<img>', element: '<img>',
tooltip: 'Enter ' + pandora.site.site.name tooltip: function() {
return Ox._('Enter {0}', [pandora.site.site.name]);
}
}) })
.attr({ .attr({
id: 'logo', id: 'logo',
@ -95,7 +97,11 @@ pandora.ui.home = function() {
load: function() { load: function() {
$line.animate({opacity: 1}, 250, function() { $line.animate({opacity: 1}, 250, function() {
$line $line
.options({tooltip: 'Visit Pad.ma'}) .options({
tooltip: function() {
return Ox._('Visit {0}', ['Pad.ma']);
}
})
.bindEvent({ .bindEvent({
anyclick: function() { anyclick: function() {
window.open('/url=https://pad.ma', '_blank'); window.open('/url=https://pad.ma', '_blank');

View file

@ -59,7 +59,9 @@ pandora.ui.home = function() {
$logo = Ox.Element({ $logo = Ox.Element({
element: '<img>', element: '<img>',
tooltip: Ox._('Enter {0}', [pandora.site.site.name]) tooltip: function() {
return Ox._('Enter {0}', [pandora.site.site.name]);
}
}) })
.attr({ .attr({
id: 'logo', id: 'logo',