Commit Graph

6 Commits

Author SHA1 Message Date
Jonathan Bobel
51fde90f79 A few clean-up items in the Platform Admin section 2023-08-18 11:30:30 -04:00
Tom Byers
a3e661830d Convert text inputs on ServiceUpdateEmailBranding
Includes changes to templates that use this form
and associated tests.
2020-08-12 10:22:20 +01:00
Chris Hill-Scott
3483490f03 Fix colour preview not loading on page load
The event was changed from `change` to `input`. The trigger was not updated accordingly.
2018-08-22 16:51:16 +01:00
Chris Hill-Scott
b10f0747ae Use input event not keyup
The `oninput` event is a more performant way to detect changes to a
textbox’s contents (compared to `onkeydown`, `onpaste`, etc).

It’s not supported in older browsers, but since this is a likely to be
used by platform admin users only that’s OK.
2018-08-22 16:31:05 +01:00
Chris Hill-Scott
6501105768 Refactor to not repeat lots of Jinja code 2018-08-22 16:31:05 +01:00
Chris Hill-Scott
b73e42650d Refactor hex colour preview Javascript
This commit improves the code that previews a hex colour when setting up
or changing an email branding.

Specifically it:
- refactors the Javascript to conform to our patterns (module pattern,
  preprocessed with Gulp)
- makes the code work when there are multiple colour previews on one
  page

It also does some visual prettifying, because I couldn’t help myself…
2018-08-22 16:31:05 +01:00