added jquery to static site
Had to switch to toWaiAppPlain to avoid a seeming bug in toWaiApp; chromium only received a partial copy of jquery. Always the same length each time, which makes me think it's a bug in the compression, although a bug in the autohead middleware is also a possibility. Anyway, there's little need for compression for a local webapp. Not wasting time compressing things is probably a net gain. Similarly, I've not worried about minifying this yet. Although that would avoid bloating the git-annex binary quite so much.
This commit is contained in:
parent
ff4ab6d6da
commit
1983ca2852
3 changed files with 9010 additions and 3 deletions
|
@ -88,7 +88,7 @@ autoUpdate poll gethtml home ms_delay ms_startdelay = do
|
|||
{- Use long polling to update the status display. -}
|
||||
let delay = show ms_delay
|
||||
let startdelay = show ms_startdelay
|
||||
addScriptRemote "http://ajax.googleapis.com/ajax/libs/jquery/1.6.2/jquery.min.js"
|
||||
addScript $ StaticR jquery_full_js
|
||||
$(widgetFile "longpolling")
|
||||
where
|
||||
ms_to_seconds :: Int -> Int
|
||||
|
@ -132,7 +132,7 @@ getConfigR = defaultLayout $ do
|
|||
webAppThread :: ThreadState -> DaemonStatusHandle -> IO ()
|
||||
webAppThread st dstatus = do
|
||||
webapp <- mkWebApp st dstatus
|
||||
app <- toWaiApp webapp
|
||||
app <- toWaiAppPlain webapp
|
||||
app' <- ifM debugEnabled
|
||||
( return $ httpDebugLogger app
|
||||
, return app
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue