Commit Graph

28 Commits

Author SHA1 Message Date
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
Robert Resch
07ff28da39
Add row group customization (#1189)
* Add row group customization

* fix rowGroup state loading

* activate rowGroup for all datatables

* add reset button

* reload page done on success callback

* Review

Co-authored-by: Bernd Bestel <bernd@berrnd.de>
2020-12-16 18:18:03 +01:00
Bernd Bestel
887526c727
Squashed commit
Fixed number input min/max amount handling
Only (auto) save valid user inputs
More filters on the stock journal pages
Save the last price per used barcode and preselect that as a total price on purchase if not empty (closes #1131)
Don't apply conversions for only_check_single_unit_in_stock ingredients (fixes #1120)
Render shopping list userfields (closes #1052)
Fixed Focus when adding included recipes (closes #1019)
Order all base objects with NOCASE (closes #1086)
2020-11-17 19:11:02 +01:00
Bernd Bestel
0a600d3277
Fix hide/view columns dialog did not work on pages with more than 1 table (references #1058) 2020-11-11 22:28:05 +01:00
Bernd Bestel
0245a925b7
Make it possible to hide columns (closes #1058)
Hide new overview page columns by default
2020-11-11 21:11:17 +01:00
Bernd Bestel
3e3321bf11
UI test/review 2020-11-08 19:00:12 +01:00
Bernd Bestel
d82fd09fba
UI test/review 2020-11-08 15:09:10 +01:00
4lloyd
76cbf796b6
[WIP] Simplified overviews on mobile (#1115)
* Simplified stock overview on mobile.

* Stock table horizontally scrollable

* Use the new mobile views for all pages (except the shopping list page, use the existing special handling there for now)
And add a clear filter button to all pages

Co-authored-by: Bernd Bestel <bernd@berrnd.de>
2020-11-07 14:53:45 +01:00
Bernd Bestel
7b32d1d8a4
More compact page headers / streamlined new page design for all pages 2020-10-31 18:37:10 +01:00
Bernd Bestel
33325d5560
Applied .blade.php formatting rules 2020-08-31 20:32:50 +02:00
Zack Arnett
4629df17b4
Cosmetic Update (#753)
* UI changes

* New (header) style was missing on some pages

* Added/changed new localization strings

* Unify page titles / apply .title class everywhere

* Reduce spacing below page title

Co-authored-by: Bernd Bestel <bernd@berrnd.de>
2020-04-19 14:51:02 +02:00
Bernd Bestel
9f8216378e
Only show the "Test plural forms"-button on the qu edit page when the current language requires more than 2 plural forms (references #261) 2019-09-20 10:33:44 +02:00
Bernd Bestel
346b589534
Make it possible to test quantity unit plural forms (closes #261) 2019-09-18 20:21:09 +02:00
Bernd Bestel
a799f2b43f
Finished qu unit conversion handling (closes #177) 2019-09-16 09:35:20 +02:00
Bernd Bestel
6094096675
Started working on qu unit conversion handling (references #177) 2019-09-15 16:40:54 +02:00
Bernd Bestel
328d96ed60
Only show plural forms text field on quantity unit edit page when the current language has more than 2 plural forms to prevent confusion (references #161) 2019-05-04 15:15:03 +02:00
Bernd Bestel
4912dd56d1
Finished migration to use gettext (this now closes #161) 2019-05-02 20:20:18 +02:00
Bernd Bestel
9b2dba2397
Migrated (hopefully) all translations to PO/Gettext (references #161) 2019-05-01 20:19:18 +02:00
Bernd Bestel
fc11da3c3f
Started working on user-defined-fields for all entities (references #176) 2019-04-22 22:16:35 +02:00
Bernd Bestel
bb5fd8360b
Fix double form submit when using ENTER (fixes #72) 2018-09-29 13:41:56 +02:00
Bernd Bestel
f583810d5c
Properly pluralize everything (closes #19) 2018-07-27 19:39:34 +02:00
Bernd Bestel
778191fd11
Fixed all (or most of) the broken stuff after the dependency upgrade party 2018-07-11 19:43:05 +02:00
Bernd Bestel
71701804ea
(More or less) finish upgrading to Bootstrap 4 2018-07-10 20:37:13 +02:00
Bernd Bestel
bbb5f1c7c7
Rework general page layout and improve responsiveness (references #9) 2018-05-12 14:25:21 +02:00
Bernd Bestel
4656a85732
Added localization support 2018-04-16 19:11:32 +02:00
Bernd Bestel
642f95a3f8
Finalize project reorganization 2018-04-14 11:10:38 +02:00
Bernd Bestel
5a1d21ef31
Reorganize project part 3 2018-04-12 21:13:38 +02:00
Bernd Bestel
feb88ab685
Reorganize project part 2 2018-04-11 19:51:05 +02:00