Commit Graph

48 Commits

Author SHA1 Message Date
Dominik Süß
93d85e3eae Removed artifacts of conversion 2016-10-26 10:05:50 -07:00
Dominik Süß
b29efba09d Improved add-modal 2016-10-26 10:05:50 -07:00
Dominik Süß
962ddb3c3a Adopted Bootstrap classes everywhere 2016-10-26 10:05:50 -07:00
Dominik Süß
36d2998b77 Added .btn-default to unify buttons across browsers (#418) 2016-10-11 14:00:30 -07:00
Moritz Kiefer
4141067428 Replace Parsec with Megaparsec (see #289) (#366)
* Replace Parsec with Megaparsec (see #289)

This builds upon PR #289 by @rasendubi

* Revert renaming of parseWithState to parseWithCtx

* Fix doctests

* Update for Megaparsec 5

* Specialize parser to improve performance

* Pretty print errors

* Swap StateT and ParsecT

This is necessary to get the correct backtracking behavior, i.e. discard
state changes if the parsing fails.
2016-07-29 08:57:10 -07:00
Simon Michael
0f5ee154c4 lib: simplify parsers; cleanups (#275)
The journal/timeclock/timedot parsers, instead of constructing (opaque)
journal update functions which are later applied to build the journal,
now construct the journal directly (by modifying the parser state). This
is easier to understand and debug. It also removes any possibility of
the journal updates being a space leak. (They weren't, in fact memory
usage is now slightly higher, but that will be addressed in other ways.)

Also:

Journal data and journal parse info have been merged into one type (for
now), and field names are more consistent.

The ParsedJournal type alias has been added to distinguish being-parsed
and finalised journals.

Journal is now a monoid.

stats: fixed an issue with ordering of include files

journal: fixed an issue with ordering of included same-date transactions

timeclock: sessions can no longer span file boundaries (unclocked-out
sessions will be auto-closed at the end of the file).

expandPath now throws a proper IO error (and requires the IO monad).
2016-05-23 00:44:19 -07:00
Simon Michael
72bdce39b6 ui: fix a recent reload breakage (fixes #346)
Commit 0a90ef4 a few weeks ago caused hledger-ui to show wrong balances
after reloading with the g key, if the journal had changed and you had
specified a query on the command line.

Now, journalReloadIfChanged reloads the full journal without filtering,
like journalReload and withJournalDo.
2016-05-20 08:20:08 -07:00
Simon Michael
1b674cbb44 web: show a proper not found page on 404 2016-05-06 19:30:23 -07:00
Simon Michael
739c8dc4cc web: preserve initial query when journal changes (#314)
The initial query specified by command line arguments is now preserved
when the journal is reloaded. This does not appear in the web UI, it's
like an invisible extra filter.
2016-04-28 21:48:30 -07:00
Simon Michael
3739f0e364 web: leave date field blank, avoid problems (#322) 2016-04-28 18:27:00 -07:00
Simon Michael
ec87da8b04 web: show the sidebar by default (#310) 2016-01-25 09:08:19 -08:00
Thomas R. Koll
f9c1902cbb web: delete a few unused files from Yesod default app
the normalize file is called but not delivered(?), anyways there is a newer version in bootstrap.css
2015-12-18 22:51:42 +01:00
Thomas R. Koll
ac3db83e02 web: add some newlines to fix tags 2015-12-16 23:07:18 +01:00
Thomas R. Koll
db338096bb web: Remove extra closing tags for scripts in header 2015-12-16 19:09:12 +01:00
Simon Michael
74512814ec cli/ui/web: rename X.Options modules to X.XOptions
Make these modules' names more like the heavily-used types they
define (CliOpts, UIOpts, WebOpts). This is consistent with
RawOptions and ReportOptions, and helps with code navigation.
2015-08-28 12:43:51 -07:00
Simon Michael
8e370692e6 web: make ViewData showable for debugging 2015-06-25 07:33:03 -07:00
Simon Michael
ebba1b09f2 web: fix more ghc 7.10 import warnings (#239) 2015-04-07 18:49:33 -07:00
Simon Michael
b0d71e3ccc web: declare a bunch of language pragmas
Makes the code more declarative, and makes building without cabal easier.
2015-04-07 18:35:41 -07:00
Simon Michael
f83590021a web: workaround for json encoding of </script> (#236) 2015-02-26 08:57:24 -08:00
Simon Michael
d801eb1ab7 web: fix error message being a bit too persistent
visiting ?add=1 afresh was still showing the previous visit's error
2015-02-23 23:55:28 +00:00
Simon Michael
e76cc6ee47 web: stay in add form when there are errors 2015-02-23 23:22:02 +00:00
Simon Michael
8bde2fd212 web: use/show full file paths in add form (#234) 2015-02-20 09:31:13 +00:00
Simon Michael
5545ed3632 web: "sidebar" query parameter shows/hides sidebar 2014-12-11 12:13:31 -08:00
Simon Michael
c1c9a989be web: fix a warning 2014-10-23 10:27:07 -07:00
Simon Michael
8d1ceb00f5 web: increase initial add form postings to four
We can't enable typeahead in dynamically added postings currently,
so increase the number of postings shown initially.
2014-08-14 00:55:51 -07:00
Simon Michael
43eee83c33 web: fix js error on journal select field 2014-07-21 08:54:17 -07:00
Simon Michael
f2d9c6e9c1 web: more register chart improvements
- show a background color for future and less-than-zero regions
- show points for transactions, not all line corners
- hovering over point shows balance, date, posted amount and transaction
- clicking a point scrolls towards that date
2014-07-18 16:45:46 -07:00
Simon Michael
50577588d0 web: upgrade flot to 0.8.3 2014-07-17 16:51:49 -07:00
Simon Michael
b0d74b1466 web: support more than 2 postings in the add form
- ctrl plus/ctrl minus adds/removes posting fields
- clicking the more link or pressing tab in the last field also works
- the focus is adjusted sensibly
- the add form is reset if closed and reopened, except the number of postings
- keyboard shortcuts should be less dependent on focus now
- tested in recent firefox, chrome, safari
- things should be robust with typeahead, with one notable exception:
  typeahead is not enabled in the new account fields when you add
  postings. I tried hard, help welcome.
2014-07-14 14:30:30 -07:00
Simon Michael
009df13baf web: make the add form a modal dialog
The add form has become a modal dialog, and been moved into the default
template. This simplifies some things, for now. Eg it's easily
accessible from any page.
2014-07-09 00:04:50 -07:00
Simon Michael
ec51d28839 web: a bunch of ui cleanup & improvement
- the web UI has been streamlined; edit form, raw & entries views dropped
- we now remember whether sidebar is open or closed
- better help dialog
- keyboard shortcuts are now available
- better add form
- more bootstrap styling
- static file cleanups
- report filtering fixes
- upgrade jquery to 2.1.1, bootstrap to 3.1.1, drop select2, add typeahead, cookie, hotkeys
- clarify debug helpers a little
- refactoring
2014-06-13 00:19:00 +01:00
Simon Michael
3ff7fe7f1b web: more static file cleanups 2014-05-23 10:20:20 -07:00
Simon Michael
6ecb2b9882 web: style.css -> hledger.css 2014-05-23 09:45:55 -07:00
Simon Michael
eea10d4420 web: upgrade jquery to 2.1.1 2014-05-23 09:34:32 -07:00
Simon Michael
bc8e4ef91e web: upgrade bootstrap to 3.1.1
This nicely fixes the too-narrow page layout.
2014-05-23 09:32:29 -07:00
Ryan Desfosses
b60da51386 made the following changes to resolve deprecated warnings:
replaced hamletToRepHtml with giveUrlRenderer
  updated type RepHtml to Html
  replaced settingsPort with setPort
2014-05-21 07:30:54 -04:00
Simon Michael
b0b9e56a9d web: include unminified source of all javascript, to help packagers (fixes #161) 2014-02-10 12:43:37 -08:00
Xinruo Sun
0275485bf9 web: add a --static-root option to customize static files root 2013-12-15 12:20:07 +08:00
Simon Michael
080eb866ec web: clean up language extensions a bit, make autoweb works again 2013-06-04 18:23:55 -07:00
Xinruo Sun
34a31285a9 web: use select2 to autocomplete
Use the javascript library select2 to autocomplete descriptions and
account names when adding a transaction. The autocomplete searches by
substring, prefix and infix. New values will also be accepted.

This replaces dhtmlxcombo library so it is removed. Also updated jquery
to the latest 1.10.1.
2013-06-01 13:20:37 +08:00
Simon Michael
19d55076a4 web: require yesod 1.2, cabal file cleanup 2013-05-14 15:36:44 -07:00
Simon Michael
0df4a235af web: set up journal for yesod devel, store it in App (fixes #101)
The web app's journal state is now kept in the yesod App as an IORef,
instead of using io-storage.
yesod devel now works; it uses the journal file specified by
$LEDGER_FILE, or ~/.hledger.journal.

web: update journal state handling, fix yesod devel - WIP
2013-04-09 12:41:22 -07:00
Marko Kocic
2cd0a9c9c0 Switch to new yesod clientSessionBacked2 for better performance 2013-04-09 08:56:41 +00:00
Simon Michael
67d1f91909 web: fix compilation; also fixes some hardcoded static urls (Xinruo Sun) 2013-01-11 13:54:49 +00:00
Simon Michael
3da5f3c0c6 web: use normalise, bootstrap, and widgets 2012-11-27 23:52:08 +00:00
Simon Michael
2ed17f29e6 web: fix ghc/cabal warnings 2012-11-16 17:08:27 +00:00
Simon Michael
695ff9a49e 91: don't require a ./config/ directory at hledger-web startup
As before, hledger-web writes a yesod session file in the current
directory at startup. It's now called ./.hledger-web_client_session_key.aes
2012-11-17 01:25:33 +00:00
Simon Michael
cfbd8bb956 web: update for yesod 1.1.3
Build with latest yesod. Also reorganise to conform more closely with
yesod's standard scaffold layout to reduce upgrade effort.
2012-11-15 17:48:48 +00:00