-
-
Notifications
You must be signed in to change notification settings - Fork 295
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
Added autocomplete input field for assigning bulk default user #3250
Open
pandafy
wants to merge
2
commits into
kiwitcms:master
Choose a base branch
from
pandafy:default-tester-autocomplete
base: master
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Open
Changes from all commits
Commits
Show all changes
2 commits
Select commit
Hold shift + click to select a range
File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change | ||||
---|---|---|---|---|---|---|
|
@@ -22,6 +22,7 @@ <h1 class="col-md-12" style="margin-top: 0"> | |||||
data-perm-add-testcase="{{ perms.testcases.add_testcase }}" | ||||||
data-perm-add-comment="{{ perms.django_comments.add_comment }}" | ||||||
data-perm-delete-comment="{{ perms.django_comments.delete_comment }}" | ||||||
data-perm-view-user="{{ perms.auth.view_user }}" | ||||||
data-trans-username-email-prompt="{% trans 'Enter username, email or user ID:' %}" | ||||||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Unused, needs to be removed:
Suggested change
|
||||||
data-trans-no-testcases-selected="{% trans 'No rows selected! Please select at least one!'%}" | ||||||
data-trans-are-you-sure="{% trans 'Are you sure?' %}" | ||||||
|
@@ -326,6 +327,32 @@ <h2 class="card-pf-title"> | |||||
|
||||||
</div> | ||||||
|
||||||
<div class="modal fade" id="default-tester-modal" tabindex="-1" role="dialog" aria-labelledby="default-tester-modal" aria-hidden="true"> | ||||||
<div class="modal-dialog"> | ||||||
<div class="modal-content"> | ||||||
<div class="modal-header"> | ||||||
<button type="button" class="close" data-dismiss="modal" aria-hidden="true" aria-label="Close"> | ||||||
<span class="pficon pficon-close"></span> | ||||||
</button> | ||||||
<h4 class="modal-title" id="default-tester-modal-title">{% trans "Default Tester" %}</h4> | ||||||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more.
Suggested change
|
||||||
</div> | ||||||
<form class="form-horizontal default-tester-form"> | ||||||
<div class="modal-body"> | ||||||
<div class="form-group"> | ||||||
<label class="col-sm-5 control-label" for="default-tester">{% trans 'Enter username, email or user ID:' %}</label> | ||||||
<div class="col-sm-6"> | ||||||
<input type="text" name="default-tester" id="default-tester-input" class="form-control"> | ||||||
</div> | ||||||
</div> | ||||||
</div> | ||||||
<div class="modal-footer"> | ||||||
<button type="button" class="btn btn-danger" data-dismiss="modal">{% trans "Cancel" %}</button> | ||||||
<button type="submit" class="btn btn-primary default-testerk-button">{% trans "Save" %}</button> | ||||||
</div> | ||||||
</form> | ||||||
</div> | ||||||
</div> | ||||||
</div> | ||||||
<template id="no_test_cases"> | ||||||
<div class="list-group-item"> | ||||||
<div class="list-group-item-header"> | ||||||
|
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
A few issues with how this function/modal behaves:
Issue #1
Issue #2
Every time the modal opens the typeahead handler gets initialized again. Using the modal 5-6 times without reloading the page leads to a chain of
User.filter
RPC calls instead of having only 1 call. This visibly slows down the page. This is similar to #3281 .