-
Notifications
You must be signed in to change notification settings - Fork 188
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat(nimbus): add audience form for new nimbus ui
Because * We are implementing all the forms in HTMX * Time to do the audience form This commit * Adds the audience form to the new Nimbus UI fixes #10839
- Loading branch information
1 parent
8e0a8da
commit aa88376
Showing
14 changed files
with
625 additions
and
16 deletions.
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
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
24 changes: 24 additions & 0 deletions
24
experimenter/experimenter/nimbus_ui_new/static/js/edit_audience.js
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 |
---|---|---|
@@ -0,0 +1,24 @@ | ||
import * as $ from "jquery"; | ||
|
||
const setupRangeSlider = () => { | ||
const rangeInput = document.getElementById("id_population_percent_slider"); | ||
const textInput = document.getElementById("id_population_percent"); | ||
|
||
// Update text input when range slider changes | ||
rangeInput.addEventListener("input", function () { | ||
textInput.value = rangeInput.value; | ||
}); | ||
|
||
// Update range slider when text input changes | ||
textInput.addEventListener("input", function () { | ||
rangeInput.value = textInput.value; | ||
}); | ||
}; | ||
|
||
$(() => { | ||
setupRangeSlider(); | ||
|
||
document.body.addEventListener("htmx:afterSwap", function () { | ||
setupRangeSlider(); | ||
}); | ||
}); |
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
Oops, something went wrong.