mirror of
https://github.com/kovidgoyal/calibre.git
synced 2025-07-09 03:04:10 -04:00
...
This commit is contained in:
parent
23bc88c681
commit
9a2f9517f7
@ -7,11 +7,10 @@
|
|||||||
###
|
###
|
||||||
|
|
||||||
viewport_top = (node) ->
|
viewport_top = (node) ->
|
||||||
node.offsetTop - window.pageYOffset
|
$(node).offset().top - window.pageYOffset
|
||||||
|
|
||||||
viewport_left = (node) ->
|
viewport_left = (node) ->
|
||||||
node.offsetLeft - window.pageXOffset
|
$(node).offset().left - window.pageXOffset
|
||||||
|
|
||||||
|
|
||||||
window.onload = ->
|
window.onload = ->
|
||||||
h1 = document.getElementsByTagName('h1')[0]
|
h1 = document.getElementsByTagName('h1')[0]
|
||||||
|
@ -3,6 +3,7 @@
|
|||||||
<head>
|
<head>
|
||||||
<title>Testing CFI functionality</title>
|
<title>Testing CFI functionality</title>
|
||||||
<script type="text/javascript" src="cfi.js"></script>
|
<script type="text/javascript" src="cfi.js"></script>
|
||||||
|
<script type="text/javascript" src="jquery.js"></script>
|
||||||
<script type="text/javascript" src="cfi-test.js"></script>
|
<script type="text/javascript" src="cfi-test.js"></script>
|
||||||
</head>
|
</head>
|
||||||
<body>
|
<body>
|
||||||
|
@ -12,13 +12,20 @@ Utilities to help with developing coffeescript based apps
|
|||||||
'''
|
'''
|
||||||
import time, SimpleHTTPServer, SocketServer, threading, os, subprocess
|
import time, SimpleHTTPServer, SocketServer, threading, os, subprocess
|
||||||
|
|
||||||
|
class Handler(SimpleHTTPServer.SimpleHTTPRequestHandler):
|
||||||
|
|
||||||
|
def translate_path(self, path):
|
||||||
|
if path.endswith('jquery.js'):
|
||||||
|
return P('content_server/jquery.js')
|
||||||
|
return SimpleHTTPServer.SimpleHTTPRequestHandler.translate_path(self,
|
||||||
|
path)
|
||||||
|
|
||||||
class Server(threading.Thread):
|
class Server(threading.Thread):
|
||||||
|
|
||||||
def __init__(self, port=8000):
|
def __init__(self, port=8000):
|
||||||
threading.Thread.__init__(self)
|
threading.Thread.__init__(self)
|
||||||
self.port = port
|
self.port = port
|
||||||
self.daemon = True
|
self.daemon = True
|
||||||
Handler = SimpleHTTPServer.SimpleHTTPRequestHandler
|
|
||||||
self.httpd = SocketServer.TCPServer(("localhost", port), Handler)
|
self.httpd = SocketServer.TCPServer(("localhost", port), Handler)
|
||||||
|
|
||||||
def run(self):
|
def run(self):
|
||||||
|
Loading…
x
Reference in New Issue
Block a user