8 Commits

Author SHA1 Message Date
Sunil Mohan Adapa
9b8388734d
ui: js: Make select all checkbox option available more broadly
- Make the code work outside backups module.

- Move code to main.js so that any app can use this functionality.

- Make the code work for multiple such form fields in the same page.

- Use only pure JS, don't use jQuery.

- Add event handlers only after DOM content is loaded to avoid race conditions.

Tests performed:

- Checking the select-all button checks all options.

- De-checking the select-all button de-checks all options.

- De-checking one option when everything is checked, de-checks the select-all
button.

- Checking the last option when everything else is checked, checks the
select-all button.

- When loading a schedule page with all options checked, select-all button is
checked.

- When loading a schedule page with some option unchecked, select-all button is
unchecked.

Signed-off-by: Sunil Mohan Adapa <sunil@medhas.org>
Reviewed-by: James Valleroy <jvalleroy@mailbox.org>
2021-01-21 20:33:28 -05:00
Sunil Mohan Adapa
001923312b
backups: Split CSS styling into a separate file
Signed-off-by: Sunil Mohan Adapa <sunil@medhas.org>
Reviewed-by: Veiko Aasa <veiko17@disroot.org>
2020-12-19 16:26:50 +02:00
Sunil Mohan Adapa
1b5a10a628
backups: Remove custom handling of progress on the restore button
Signed-off-by: Sunil Mohan Adapa <sunil@medhas.org>
Reviewed-by: Veiko Aasa <veiko17@disroot.org>
2020-06-29 10:08:47 +03:00
Sunil Mohan Adapa
a2f897e33d
*.js: Use SPDX license identifier
Reviewed-by: Veiko Aasa <veiko17@disroot.org>
2020-02-19 14:40:43 +02:00
Joseph Nuthalapati
c952dc7a99
backups: Change "select all" to a pure JavaScript implementation
- Remove Python code to handle the extra item in the submitted form
- The select-all checkbox is never submitted in the form since it is missing the
  "name" attribute
- Replace selector ':checkbox' with the faster selector '[type=checkbox]'

Signed-off-by: Joseph Nuthalapati <njoseph@thoughtworks.com>
Reviewed-by: James Valleroy <jvalleroy@mailbox.org>
2019-07-13 06:37:43 -04:00
Joseph Nuthalapati
061c308e35
backups: Add option to select/deselect all apps for backup or restore
This is less tiresome for users and also improves the speed of functional tests.

Signed-off-by: Joseph Nuthalapati <njoseph@thoughtworks.com>
Reviewed-by: James Valleroy <jvalleroy@mailbox.org>
2019-07-13 06:37:39 -04:00
Sunil Mohan Adapa
983f4d13e8
backups: Fix showing not-installed apps in create backup page
- Also minor styling.

Signed-off-by: Sunil Mohan Adapa <sunil@medhas.org>
2019-01-25 17:59:55 -08:00
Joseph Nuthalapati
7d6284a829
backups: Add a loader to the restore button to indicate progress
Signed-off-by: Joseph Nuthalapati <njoseph@thoughtworks.com>
Reviewed-by: Sunil Mohan Adapa <sunil@medhas.org>
2019-01-25 17:02:30 -08:00