From 282f185e91649ff935d33f4497c4cbb989df7155 Mon Sep 17 00:00:00 2001 From: Kovid Goyal Date: Fri, 6 Jan 2012 16:16:30 +0530 Subject: [PATCH] ... --- setup/hosting.py | 3 +++ setup/upload.py | 2 ++ src/calibre/ebooks/oeb/display/cfi.coffee | 4 +++- 3 files changed, 8 insertions(+), 1 deletion(-) diff --git a/setup/hosting.py b/setup/hosting.py index d86cef2d31..5ae1b38a94 100644 --- a/setup/hosting.py +++ b/setup/hosting.py @@ -344,6 +344,9 @@ class GoogleCode(Base):# {{{ class SourceForge(Base): # {{{ + # Note that you should manually ssh once to username,project@frs.sourceforge.net + # on the staging server so that the host key is setup + def __init__(self, files, project, version, username, replace=False): self.username, self.project, self.version = username, project, version self.base = '/home/frs/project/c/ca/'+project diff --git a/setup/upload.py b/setup/upload.py index 42e0aaf7fd..d9d073388a 100644 --- a/setup/upload.py +++ b/setup/upload.py @@ -75,6 +75,8 @@ def get_google_data(): 'username':'kovidgoyal@gmail.com', 'password':pw, 'gc_password':gc_password, 'path_map_server':'root@kovidgoyal.net', 'path_map_location':'/var/www/status.calibre-ebook.com/googlepaths', + # If you change this remember to change it in the + # status.calibre-ebook.com server as well 'project':'calibre-ebook-ii' } diff --git a/src/calibre/ebooks/oeb/display/cfi.coffee b/src/calibre/ebooks/oeb/display/cfi.coffee index 924241baa4..7d041a0d80 100644 --- a/src/calibre/ebooks/oeb/display/cfi.coffee +++ b/src/calibre/ebooks/oeb/display/cfi.coffee @@ -493,15 +493,17 @@ class CanonicalFragmentIdentifier r.surroundContents(span) span.scrollIntoView() fn = -> + # Remove the span we inserted p = span.parentNode for node in span.childNodes span.removeChild(node) p.insertBefore(node, span) p.removeChild(span) p.normalize() + + # Reset the range to what it was before span r.setStart(sc, so) r.setEnd(ec, eo) - rect = r.getClientRects()[0] x = (point.a*rect.left + (1-point.a)*rect.right) y = (rect.top + rect.bottom)/2