Commit Graph

18 Commits

Author SHA1 Message Date
Katharina Bogad
4cde333d35 Fix datatable modals 2021-06-25 17:16:26 +02:00
Katharina Bogad
2a7fbbecf8 Fix bugs 2021-06-24 22:18:19 +02:00
Katharina Bogad
7a7e944c09 Nuke popup iFrames 2021-06-24 18:56:36 +02:00
Katharina Bogad
f051f05341 Bump bootbox to 5.5.2, preload view javascript 2021-06-24 15:55:42 +02:00
Katharina Bogad
77e365985f Make CSS preloadable, move some CSS out of header 2021-06-24 11:54:25 +02:00
Katharina Bogad
9dab8a502f Moved view-specific GrocyConfig variables into own section
Additionally, GrocyConfig is now complete for every page
with the first line of the body tag.
2021-06-24 11:38:53 +02:00
Katharina Bogad
6b5440cf7a Fix some implementation errors 2021-06-23 23:38:59 +02:00
Katharina Bogad
bda2a742ae View Loading via singleton 2021-06-23 22:41:58 +02:00
Katharina Bogad
4267b42a0a Fix eslint complaints 2021-06-23 22:33:49 +02:00
Katharina Bogad
e744aa8dc7 scoping: refactor components, GrocyProxy. 2021-06-23 20:31:13 +02:00
Katharina Bogad
843b3f28af scoping: Add proxy class, move UriParam functions 2021-06-23 15:41:18 +02:00
Katharina Bogad
598860017b Move components to main grocy bundle
Less stalled requests. Still not optimal though.
2021-06-21 13:14:37 +02:00
Katharina Bogad
b7a1c870f0 js: some speed improvements on page load 2021-06-21 00:16:05 +02:00
Katharina Bogad
7f598058bf i18n: static pot to json compilation
Translations aren't embedded on every page load anymore;
this saves roughly 55kB on every single request, because
these can now be cached.
2021-06-20 23:12:17 +02:00
Katharina Bogad
3b342f90db viewjs: extract functions for DataTable Initialisation
Also revert back to use rollup-plugin-css-porter,
because rollup-postcss has issues and also doesn't work.
2021-06-20 09:17:11 +02:00
Katharina Bogad
3d7f0652ce eslint: viewjs
Fixed all reported errors, deduped some code in the picker components.
However, these edits were small enough that I'm positive they work.
2021-06-18 20:55:09 +02:00
Katharina Bogad
d6eb70496f eslint: grocy.js 2021-06-18 19:32:57 +02:00
Katharina Bogad
f7bc6a3f6d Modernize Javascript
This *absolute commit monster* does the following things:

- Introduce gulp to build javascript and css files.

  This includes moving node_modules out of the public/ folder.
  Use `gulp --tasks` to get a list of all tasks; however some
  of them are automatically generated.

  Use `gulp live` to watch for changes and automatically recompile
  what's needed.

- Upgrade to yarn2
- Upgrade FullCalendar to 4.4.2

  I know that 5.x is the current version, but two major version upgrades
  are too much right now. Also v5 would break any custom css as they
  renamed a bunch of classes.

- Move Styles to sass

  (Most) global styles are now included in one sass file. This also
  means that we now compile our own bootstrap.

- Javascript is now in strict mode

  Because everything is a module now, `use strict` is now in effect
  for all javascript files. There are probably still some parts left
  where implicit variable declarations were used.

- grocy*.js were split up in modules.

  `window.Grocy` is now an instance of GrocyClass. API-wise nothing
  has changed (albeit some functions were added regarding Undo actions)
  At the Moment, this leaks a whole bunch of functions into window
  (that was easier than tracking those down).

- FindObjectIn... style functions were removed.

  Array.prototype.find and Array.prototype.filter suffice.

- Use babel to preprocess javascript.
- Use rollup to bundle javascript.

  rollup bundles and tree-shakes es6 javascript bundles.
  It also allows to "import" css files and generate css
  files specific to this javascript file. This is used
  in viewjs scripts, for example when importing FullCalendar,
  to generate an associated viewcss file.

- Use postcss to post-process css files.

  postcss uses autoprefixer to handle browser compatiblity.
  Internally this uses the package `browserslist`; and is currently
  configured to the default setting.

- Minify assets when building in production

  `gulp publish` builds all assets in production mode, that is,
  the assets get minified. This includes javascript as well as
  css files.

- css bundling

  concatCss is used to pull @imports of non-sass-files into one
  grocy.css

- animate.css is now in the main bundle

  animate.css was used in so many places that it is now located
  in the main style bundle.
2021-06-18 12:44:39 +02:00