Matt-Yorkley
12f51febd3
Enable Webpack compiling for all images
2021-12-27 17:45:06 +00:00
Matt-Yorkley
90956c9d10
Switch mail CSS to Webpacker
2021-12-27 17:45:06 +00:00
Matt-Yorkley
250f0c0a65
Bring in missing select2 image
...
This missing image was previously ignored, but now causes a compile error when not found.
2021-12-27 17:45:06 +00:00
Matt-Yorkley
0e4d77a1bc
Move current select2-rails gem stylesheet to /vendor
...
This version isn't available via npm and we can't load it from the gem any more as we move to Webpack assets.
As a side note: I think we'll need to replace Select2 soon anyway, so we can delete this once we've done that.
2021-12-27 17:45:06 +00:00
Matt-Yorkley
80be57a777
Install select2 via yarn and import CSS from node_modules
2021-12-27 17:45:06 +00:00
Matt-Yorkley
74bed15f7f
Fix crazy issue with @extend on icons
...
This one line of code was crashing asset compilation... :/
2021-12-27 17:45:06 +00:00
Matt-Yorkley
a38d495bef
Update admin css image paths
2021-12-27 17:45:06 +00:00
Matt-Yorkley
2ac3cda2f4
Deal with deprecated @extend syntax
...
Errors:
```
SassError: SassError: compound selectors may no longer be extended.
Consider `@extend a, :hover` instead.
See http://bit.ly/ExtendCompound for details.
```
2021-12-27 17:45:06 +00:00
Matt-Yorkley
2992439706
Include shared variables
2021-12-27 17:45:06 +00:00
Matt-Yorkley
df9f9c1c3b
Replace glob imports
...
Apparently glob imports aren't a thing in modern sass... *shrugs*
2021-12-27 17:45:06 +00:00
Matt-Yorkley
5bc02d1e74
Fix admin font paths and loading
2021-12-27 17:45:06 +00:00
Matt-Yorkley
6ee6fc733d
Remove duplicated imports
2021-12-27 17:45:06 +00:00
Matt-Yorkley
28f9f4245d
Fix deprecated syntax using @extend with :before
...
This is no longer valid scss
2021-12-27 17:45:06 +00:00
Matt-Yorkley
6f06205eed
Switch admin CSS to webpack
2021-12-27 17:45:06 +00:00
Matt-Yorkley
ba583dcf39
Install jquery-ui via yarn
...
We can delete the gem once the Javascript part has been handled
2021-12-27 17:45:06 +00:00
Matt-Yorkley
9d18f318ac
Remove Sprockets includes in admin scss
2021-12-27 17:45:06 +00:00
Matt-Yorkley
b33ac49442
Update vendor import paths
2021-12-27 17:45:06 +00:00
Matt-Yorkley
0057dbcb89
Remove Sprockets require statements
2021-12-27 17:45:06 +00:00
Matt-Yorkley
ec2213d2f0
Reduce duplicate import statements
...
It looks ike these CSS rules are actually being re-imported multiple times, which is bloating the output.
2021-12-27 17:45:06 +00:00
Matt-Yorkley
825aeeae04
Migrate images and update assets
2021-12-27 17:45:06 +00:00
Matt-Yorkley
cb27081425
Install Foundation 5.5.2 via yarn
2021-12-27 17:45:05 +00:00
Matt-Yorkley
8dfc30438b
Move CSS to Webpacker
2021-12-27 17:45:05 +00:00
Matt-Yorkley
dd23e3d38a
Simplify payment method controller
2021-12-20 18:47:22 +00:00
Matt-Yorkley
b4dab46cf8
Remove unused code for changing required attributes
2021-12-20 18:36:28 +00:00
Matt-Yorkley
723d6489cd
Extract initSelectedCard()
2021-12-20 18:36:26 +00:00
Matt-Yorkley
9525e353a3
Don't try to select a card if there is no select element
...
This error was being thrown when the user had no cards saved:
```
TypeError: stripeCardsController is null
```
2021-12-20 18:36:09 +00:00
Matt-Yorkley
a64f654697
Don't try to select a card if there is no selectTarget
...
This error was being thrown when the user had no cards saved:
```
Error: Missing target element "stripe-cards.select"
```
2021-12-20 15:41:22 +00:00
Matt-Yorkley
f18fc3c2f3
Implement disconnect() to tidy up (remove) event listeners from the DOM when finished
2021-12-20 15:29:52 +00:00
Matt-Yorkley
d58f5aa25d
Move initialization to initialize()
2021-12-20 15:29:52 +00:00
Matt-Yorkley
33c156bb55
Extract (arrow) functions for callbacks used by event listeners and reduce variable assignments
2021-12-20 15:29:52 +00:00
Matt-Yorkley
24c051bad3
Simplify stripe selected check
2021-12-20 15:21:13 +00:00
Jean-Baptiste Bellet
2c5667ef56
Initialize stripe-cards controller when selecting a payment method
2021-12-20 15:34:58 +01:00
Jean-Baptiste Bellet
d4ec075dfc
Disabled stripe-cards input if a already registred card is select
...
And then re-enabled it, if use decide to register a new card
2021-12-20 15:34:58 +01:00
Jean-Baptiste Bellet
7b6aa99de2
Handle when input is already checked
...
ie. user hasn't click on anything
2021-12-20 15:34:58 +01:00
Jean-Baptiste Bellet
6ef7256295
Only submit handle form submit if stripeElementsForm is visible
2021-12-20 15:34:58 +01:00
Matt-Yorkley
2fe96c5f63
Update Stripe controller hidden fields
2021-12-07 16:29:25 +00:00
Matt-Yorkley
720d147421
Bring in stimulus controller for stripe elements
2021-12-07 16:29:25 +00:00
Matt-Yorkley
d85597fe4c
Rename stripe cards controller
2021-12-07 16:29:25 +00:00
Jean-Baptiste Bellet
fd5ad7566a
Disabled all form elements that should not be sent to the controller
2021-12-07 16:27:22 +00:00
Jean-Baptiste Bellet
f7662947dc
Extract to a method that handle all the form elements
2021-12-07 16:27:22 +00:00
Jean-Baptiste Bellet
7437c6a6d7
Add a stripe controller that show/hide stripe form if saved cards or not
2021-12-07 16:27:22 +00:00
Jean-Baptiste Bellet
5f3ea6accb
Do not init by hidden all the container
...
that allow to init the content without clicking on anything
2021-12-07 16:27:22 +00:00
Jean-Baptiste Bellet
7159cc3ff1
Handle required attribute on input for PaymentMethod controller
...
This is done for one reason : do not submit form with required attribute on input that are actually hidden ; this is not handle correctly by browsers.
This idea here is to add/remove the required attribute on each input if the form is visible or not.
2021-12-07 16:27:22 +00:00
Jean-Baptiste Bellet
3063b041d1
Change the paymentmethod controller to handle both desc and form
...
Add tests as well
Update _payment.html.haml
Update _payment.html.haml
2021-12-07 16:23:39 +00:00
Jean-Baptiste Bellet
786b198f4d
Create an updateinput controller
...
- that update the targets input value to the value stored in data attribute
- Add tests
2021-10-06 15:06:56 +05:30
Jean-Baptiste Bellet
49e93a6125
Add StimulusJS controllers via webpacker for the admin
2021-10-06 15:06:56 +05:30
Matt-Yorkley
44b870d248
Bump MRUJS and update syntax for new plugin architecture
2021-09-08 19:39:52 +01:00
Matt-Yorkley
5ef34347a3
Implement optional non-Angular flash messages
2021-09-08 10:34:34 +01:00
Matt-Yorkley
7fa9457550
Add cable_ready
2021-09-08 10:34:34 +01:00
Matt-Yorkley
79efa50a34
Add Turbo and MRUJS
2021-09-08 00:05:04 +01:00