This commit is contained in:
Kovid Goyal 2012-01-06 16:16:30 +05:30
parent 8ed5be3c9e
commit 282f185e91
3 changed files with 8 additions and 1 deletions

View File

@ -344,6 +344,9 @@ class GoogleCode(Base):# {{{
class SourceForge(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): def __init__(self, files, project, version, username, replace=False):
self.username, self.project, self.version = username, project, version self.username, self.project, self.version = username, project, version
self.base = '/home/frs/project/c/ca/'+project self.base = '/home/frs/project/c/ca/'+project

View File

@ -75,6 +75,8 @@ def get_google_data():
'username':'kovidgoyal@gmail.com', 'password':pw, 'gc_password':gc_password, 'username':'kovidgoyal@gmail.com', 'password':pw, 'gc_password':gc_password,
'path_map_server':'root@kovidgoyal.net', 'path_map_server':'root@kovidgoyal.net',
'path_map_location':'/var/www/status.calibre-ebook.com/googlepaths', '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' 'project':'calibre-ebook-ii'
} }

View File

@ -493,15 +493,17 @@ class CanonicalFragmentIdentifier
r.surroundContents(span) r.surroundContents(span)
span.scrollIntoView() span.scrollIntoView()
fn = -> fn = ->
# Remove the span we inserted
p = span.parentNode p = span.parentNode
for node in span.childNodes for node in span.childNodes
span.removeChild(node) span.removeChild(node)
p.insertBefore(node, span) p.insertBefore(node, span)
p.removeChild(span) p.removeChild(span)
p.normalize() p.normalize()
# Reset the range to what it was before span
r.setStart(sc, so) r.setStart(sc, so)
r.setEnd(ec, eo) r.setEnd(ec, eo)
rect = r.getClientRects()[0] rect = r.getClientRects()[0]
x = (point.a*rect.left + (1-point.a)*rect.right) x = (point.a*rect.left + (1-point.a)*rect.right)
y = (rect.top + rect.bottom)/2 y = (rect.top + rect.bottom)/2