Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

KG - Batch Delete Users + Related Email Logic Improvement #1734

Merged
merged 5 commits into from Mar 1, 2019

Conversation

kayla-glick
Copy link
Contributor

@kayla-glick kayla-glick commented Feb 27, 2019

This pull request primarily covers this story https://www.pivotaltracker.com/story/show/164082119 but does include https://www.pivotaltracker.com/story/show/156044835 as well due to the overlapping work.

Overview

The majority of the work involves the new batch-select.js library that I wrote here. This library can be used in different contexts to allow users to select multiple records for an action. In the scope of this story, this allows users to delete multiple Authorized Users at once and send out a single email (that part is done separately on the server).

How it Works

You can initialize the batch-select.js library by calling $('...').batchSelect(). You can provide an object consisting of various options listed under DEFAULTS to customize theming and text.

After being initialized, a user may click and hold on one of the elements initialized upon (this will generally be a button). After .5 seconds, all of the elements initialized on will be hidden and replaced with checkboxes and a button will appear to submit with all of the checked rows. After selecting all of the records they want to change, users can click the new button, confirm a sweet alert, and an ajax request is sent based on the options provided to the initializer.

Also note that the library allows users to simply click one of the elements like normal.

Here is an example screenshot. This is after holding my mouse on one of the delete buttons which has been highlighted and the Delete Selected button appears next to that row.
image

@Stuart-Johnson Stuart-Johnson merged commit adb05ab into v3.5.0 Mar 1, 2019
@Stuart-Johnson Stuart-Johnson deleted the kg-batch_remove_users branch March 1, 2019 21:10
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants