[geeklog-cvs] geeklog: Modified for small devices such as iPhone
geeklog-cvs at lists.geeklog.net
geeklog-cvs at lists.geeklog.net
Sat Apr 28 11:10:32 EDT 2012
changeset 8633:438c551c4931
url: http://project.geeklog.net/cgi-bin/hgwebdir.cgi/geeklog/rev/438c551c4931
user: dengen
date: Sun Apr 29 00:03:55 2012 +0900
description:
Modified for small devices such as iPhone
But still not complete
diffstat:
public_html/javascript/fix_tooltips.js | 8 ++++----
1 files changed, 4 insertions(+), 4 deletions(-)
diffs (28 lines):
diff -r a346e309db96 -r 438c551c4931 public_html/javascript/fix_tooltips.js
--- a/public_html/javascript/fix_tooltips.js Sat Apr 28 15:37:01 2012 +0900
+++ b/public_html/javascript/fix_tooltips.js Sun Apr 29 00:03:55 2012 +0900
@@ -6,20 +6,20 @@
var viewport_width = parseInt($w.width());
// fix each tooltip
$('a.gl-tooltip').each(function() {
- // cache the tooltip element
+ // cache the tooltip element
var $s = $(this).find('span');
// estimate the bottom and right coordinates of the tooltip
var tooltip_bottom = parseInt($(this).offset().top + $s.outerHeight() - $w.scrollTop() + 30);
- var tooltip_right = parseInt($(this).offset().left + $s.outerWidth() - $w.scrollLeft() + 30);
+ var tooltip_right = parseInt($(this).offset().left + $s.outerWidth() - $w.scrollLeft() + 40);
// move the element around as necessary
if (tooltip_bottom >= viewport_height) {
- var top = parseInt(($s.outerHeight() + 22) * -1) + 'px';
+ var top = parseInt(($s.outerHeight() + 10) * -1) + 'px';
$s.css('top', top);
} else {
$s.css('top', '2.2em');
}
if (tooltip_right >= viewport_width) {
- var left = parseInt($s.width() * -1) + 'px';
+ var left = parseInt(viewport_width - tooltip_right + 30) + 'px';
$s.css('left', left);
} else {
$s.css('left', '2.2em');
More information about the geeklog-cvs
mailing list