Commit graph

28 commits

Author SHA1 Message Date
Joey Hess
c71fa9f217 Revert "remove newlines from static js and css"
This reverts commit 5a0779fd70.

No longer needed now that EvilSplicer handles this.
2014-06-13 02:20:39 -04:00
Joey Hess
5a0779fd70 remove newlines from static js and css
This works around a bug in the EvilSplicer; see
http://git-annex.branchable.com/bugs/Bootstrap3_icons_missing_on_Android/
2014-05-28 18:21:01 -04:00
Sören Brunk
c8dccf9582 update bootstrap files to bootstrap3 2014-04-21 19:05:09 +02:00
Sören Brunk
4d4797b8c8 update jquery and jquery ui
This should still be compatible with bootstrap2 but is required for bootstrap3
2014-04-21 19:05:09 +02:00
Joey Hess
2e2e887abf update static/favicon.ico from doc/favicon.ico 2014-03-16 16:06:06 -04:00
Joey Hess
4a5ab9b1e7 Tweak magic number to fix bad behavior in Firefox, which was caused by an earlier fix to bad behavior in Chromium.
Browsers are crap.
2013-12-09 17:44:45 -04:00
Joey Hess
8fb1973c76 move all static site files out of subdirectories
Works around yesod-static path bug on windows.
https://github.com/yesodweb/yesod/issues/626
2013-12-09 14:38:22 -04:00
Joey Hess
183f7355cd global webapp redirects, to finish upgrades
When an automatic upgrade completes, or when the user clicks on the upgrade
button in one webapp, but also has it open in another browser window/tab,
we have a problem: The current web server is going to stop running in
minutes, but there is no way to send a redirect to the web browser to the
new url.

To solve this, used long polling, so the webapp is always listening for
urls it should redirect to. This allows globally redirecting every open
webapp. Works great! Tested with 2 web browsers with 2 tabs each.
May be useful for other purposes later too, dunno.

The overhead is 2 http requests per page load in the webapp. Due to yesod's
speed, this does not seem to noticibly delay it. Only 1 of the requests
could possibly block the page load, the other is async.
2013-11-23 14:47:38 -04:00
Joey Hess
1c36af163c animate syncing and other activity icons 2013-04-08 22:54:02 -04:00
Joey Hess
f3c999062d re-setup repolist after longpoll refresh 2013-03-14 14:50:44 -04:00
Joey Hess
b9b5c3991c drag and drop repo list (doesn't yet actually change cost settings) 2013-03-13 22:47:16 -04:00
Joey Hess
4f4209b833 webapp: Added help buttons and links next to fields that require explanations. 2012-12-02 22:33:30 -04:00
Joey Hess
e9d9d9d5ea add icons 2012-07-31 03:10:16 -04:00
Joey Hess
6e40aed948 fix noscript mode to not allocate notification ids on each refresh
Now the javascript does an ajax call at the start to request the url
to use to poll, and the notification id is generated then, once we know
javascript is working.
2012-07-30 22:24:19 -04:00
Joey Hess
d3413ee5a9 further refactoring my js 2012-07-30 20:33:23 -04:00
Joey Hess
9648acc7a4 got this JS working 2012-07-30 20:22:10 -04:00
Joey Hess
502bc5d5f8 rewrote longpolling, trying to avoid duplication
does not work though. stupid JS
2012-07-30 18:01:41 -04:00
Joey Hess
78b3dada5b better connection close handling
Depending on how the webapp was started up and whether the user clicked on
any links in it, window.close() may be disallowed by browser security
policy. Also if that fails, display a modal dialog that nicely blackens out
the webapp.

TODO: avoid Escape closing it. Bootstrap's docs are unclear about how to do
that.
2012-07-30 14:50:32 -04:00
Joey Hess
a994130843 implement server-side alert closing
Rather than using bootstrap's client-side closing.
Now closed alerts stay closed.
2012-07-30 14:08:22 -04:00
Joey Hess
c0ca6f44ac template reorg 2012-07-27 20:47:48 -04:00
Joey Hess
ecd63e2981 template cleanup
use julius's nice #id and .class things
2012-07-27 20:25:28 -04:00
Joey Hess
7717501fee add alert close buttons 2012-07-27 16:28:00 -04:00
Joey Hess
bc5b151617 update to newer version of Bootstrap
This does fix some UI issues I was having.
2012-07-27 14:45:19 -04:00
Joey Hess
7e3c1e008d webapp now uses twitter bootstrap
mocked up the main screen, and am actually pretty happy with it!
2012-07-27 04:48:50 -04:00
Joey Hess
1192e305c7 update to newer version needed by bootstrap 2012-07-27 04:37:29 -04:00
Joey Hess
d92f5ff44c add bootstrap 2012-07-27 01:36:01 -04:00
Joey Hess
1983ca2852 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.
2012-07-26 23:55:51 -04:00
Joey Hess
3ac2cf09e5 added a custom defaultLayout, static site, and favicon
Broke hamlet out into standalone files.

I don't like the favicon display; it should be served from /favicon.ico,
but I could only get the static site to serve /static/favicon.ico, so
I had to use a <link rel=icon> to pull it in. I looked at
Yesod.Default.Handlers.getFaviconR, but it doesn't seem to embed
the favicon into the binary?
2012-07-26 02:45:01 -04:00