Andy Brett
867947f6b2
refactor availableUnitScales into unitScales
2020-10-29 09:18:24 -07:00
Andy Brett
8591934c19
extract availableUnits to separate method
2020-10-29 09:18:24 -07:00
Andy Brett
23dd09eaad
remove extra debugger statement 🤦
2020-10-29 09:18:23 -07:00
Andy Brett
fa62ec0bff
only show available units for products
2020-10-29 09:17:49 -07:00
Luis Ramos
76afc0b407
Merge pull request #6202 from cillian/sort-admin-products-by-name-fix
...
Fix sorting of admin products by name
2020-10-29 00:09:31 +00:00
Matt-Yorkley
5edd562691
Merge pull request #6238 from openfoodfoundation/mobile-5-product-listings
...
Merge Product Listings to master
2020-10-22 21:55:42 +02:00
Matt-Yorkley
489529d30e
Merge pull request #5729 from luisramos0/image_settings
...
Remove Image settings page and standardise Paperclip styles
2020-10-22 15:58:14 +02:00
Maikel Linke
db53848092
Enable switching language of "Price breakdown"
...
And move translation to its own context.
2020-10-22 15:46:49 +11:00
Maikel Linke
ec1887544e
Reduce bulk input modal size
...
This brings the related elements closer together.
2020-10-22 15:46:49 +11:00
Maikel Linke
bbe2ce9cba
Add "Price breakdown" heading to pop-up
...
The translation key was already present even though it was unused.
2020-10-22 15:46:48 +11:00
Maikel Linke
30bfb1a7bd
Fix clickable area when opening price breakdown
...
Once a price breakdown has been opened, the nub was over the bottom half
of the pie button. It made half of the pie unclickable.
And when you closed the breakdown, it became invisible but stayed
present, absorbing all clicks in that area. So other pie buttons were
unclickable as well.
2020-10-22 15:46:48 +11:00
Maikel Linke
cb5089a69a
Increase space for variant name on mobile
2020-10-22 15:46:48 +11:00
Maikel Linke
3a3ec4e45e
Close price breakdown on click outside
2020-10-22 15:46:47 +11:00
Maikel Linke
1fd4dc471a
Position the price breakdown below the button
2020-10-22 15:46:47 +11:00
Maikel Linke
230d3e76a1
Label plus and minus symbols as special
2020-10-22 15:46:47 +11:00
Maikel Linke
cdbbcfd1fe
Better naming for translation keys
2020-10-22 15:46:47 +11:00
Maikel Linke
e45941276e
Better naming of translation keys
...
Also splitting one key for two different uses.
2020-10-22 15:46:47 +11:00
Maikel Linke
d2600b1d40
Avoid translation errors by hardcoding symbols
...
The fullwidth plus and minus signs are well understood in all countries
(that participate in the development of OFN). It's more likely that a
translator enters a normal plus or minus than that they want to change
the symbol. A normal + or - sign doesn't fill a whole character space
and is therefore not well aligned in the design.
2020-10-22 15:46:47 +11:00
Maikel Linke
9da91576ac
Fix height of invisible "in cart" text
...
While the text "x in cart" isn't visible, the item quantity is not set.
A missing variable leads to longer text that is taken up more space. In
this case it was two lines instead of one line. The resulting extra line
of margin disappeared when adding to the cart and the rest of the page
jumped up.
2020-10-22 15:46:46 +11:00
Maikel Linke
57178659c3
Remove bulk icon as per design
2020-10-22 15:46:46 +11:00
Maikel Linke
d337561ea8
Move ShopVariantCtrl to own file and spec it
2020-10-22 15:46:46 +11:00
Maikel Linke
755773e5ad
Style code
2020-10-22 15:46:46 +11:00
Maikel Linke
58f4d7393c
Make quantity labels translatable
2020-10-22 15:46:46 +11:00
Maikel Linke
01c4882759
Replace bulk buy inputs with add-remove-buttons
2020-10-22 15:46:46 +11:00
Maikel Linke
59c13b97ea
Replace quantity input with add-remove buttons
...
The new mobile friendly design contains a nice "Add" button to add
variants to your cart. Once you have the variant in you cart, it's
replaced by plus and minus buttons to adjust the quantity.
Other languages have longer words than "Add" which need to fit on the
button. Since the add button and the +/- buttons should have the same
width, I widened them a little bit so that they fit the longest words
Aggiungi and Добавить.
2020-10-22 15:46:46 +11:00
Maikel Linke
35747dc2b1
Emphasize first identifying name of a variant
...
That can be a variant name or the unit if the name is missing. Putting
the second and third element in the background consistently.
2020-10-22 15:46:45 +11:00
Maikel Linke
7660116792
Display variant name only when set
...
The previous method was falling back to the product name which is
displayed already.
2020-10-22 15:46:45 +11:00
Maikel Linke
96cd5ca1fe
Fix "Place price-breakdown and price in the middle"
2020-10-22 15:46:45 +11:00
Maikel Linke
8006870b66
Adjust column widths
2020-10-22 15:46:45 +11:00
Maikel Linke
fe1618cada
Add description to product listing
...
It's truncated to one line and a click reveals the modal.
2020-10-22 15:46:45 +11:00
Maikel Linke
893b6660fc
Change price-breakdown colour to grey
2020-10-22 15:46:44 +11:00
Maikel Linke
3e789fdb84
Show only tabular price breakdown, no graph
2020-10-22 15:46:44 +11:00
Maikel Linke
065314f0e4
Revert "Remove popover indicator"
...
This reverts commit 0bef97a46710c50b8519752009ca9e8c811f8326.
2020-10-22 15:46:44 +11:00
Maikel Linke
952c39f736
Remove popover indicator
2020-10-22 15:46:44 +11:00
Maikel Linke
2b982cfc2e
Show price breakdown on all screens
2020-10-22 15:46:44 +11:00
Maikel Linke
e29be51c45
Place price-breakdown and price in the middle
2020-10-22 15:46:44 +11:00
Maikel Linke
c15828061f
Move unit under name
2020-10-22 15:46:44 +11:00
Maikel Linke
52c8c19dfc
Remove black background from variant name on mobile
...
table-cell gave it a black background.
Also display it on the same line as the quantity input.
2020-10-22 15:46:44 +11:00
Maikel Linke
61d55ff16f
Remove per-variant subtotal from mobile view
2020-10-22 15:46:44 +11:00
Luis Ramos
9f568c1e9d
Merge pull request #5928 from luisramos0/spree_core_js
...
[Bye bye spree] Bring final bits of js and css from spree_core
2020-10-20 13:20:41 +01:00
Luis Ramos
0f06195baa
Remove Image settings page, these settings will come from ofn-install now
2020-10-20 11:20:37 +01:00
Cillian O'Ruanaidh
35110eaf4a
Make sure :sorting parameter is nested inside the :q parameter to fix sorting of admin products
...
Fixes #6105 .
2020-10-16 15:21:15 +01:00
Matt-Yorkley
32999e6be4
Add polish translations with momentjs
2020-10-12 23:05:43 +01:00
Luis Ramos
9545c57969
Merge pull request #6049 from luisramos0/momentjs
...
Use yarn and move Momentjs from gemfile to yarn
2020-10-12 15:28:23 +01:00
Cillian O'Ruanaidh
6c22ee43a7
When searching for shop products check the variant :display_name and :display_as fields too.
...
Fixes #5757
2020-10-02 16:05:48 +01:00
Luis Ramos
fb9bcdee7c
Load spree js on OFN side, not the one on Spree's side
2020-09-23 12:45:30 +01:00
Luis Ramos
3af5482960
Make date picker work with karma tests where the old Spree.translations js translations object is not defined
2020-09-23 12:45:30 +01:00
Luis Ramos
bfd4164c0b
Remove handlebar extensions and some dead translations
...
This is not needed, these translations are always used through Spree.translations and this system is deprecated anyway
2020-09-23 12:45:30 +01:00
Luis Ramos
d5d2ae3ce0
Remove some dead code and broken links from comments
2020-09-23 12:45:29 +01:00
Luis Ramos
496f9c106e
Bring the very last bits of js and css from spree_core
2020-09-23 12:45:29 +01:00