-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
gongda
authored and
gongda
committed
Apr 18, 2023
1 parent
5f00f00
commit 4b550bf
Showing
10 changed files
with
221 additions
and
33 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
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
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
68 changes: 48 additions & 20 deletions
68
stable_diffusion_webui/stable_diffusion_webui/templates/tags/multiple_check.html
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 |
---|---|---|
@@ -1,23 +1,51 @@ | ||
<div class="mb-2"> | ||
<button class="btn btn-outline-dark btn-sm" type="button" data-bs-toggle="collapse" data-bs-target="#{{input_id}}Panel" aria-expanded="false" aria-controls="{{input_id}}Panel"> | ||
{{ label }} | ||
</button> | ||
|
||
<button type="button" class="btn btn-light btn-sm" id="{{ input_id }}Btn" onclick="selectAllOptions('{{ input_id }}')"> | ||
Check All | ||
</button> | ||
<button type="button" class="btn btn-outline-dark btn-sm" data-bs-toggle="modal" data-bs-target="#{{input_id}}OptionsSearchBox">Select {{ label }} Prompt</button> | ||
<span class="text-secondary" id="{{input_id}}Result"></span> | ||
</div> | ||
|
||
<div id="{{ input_id }}Panel" class="collapse"> | ||
{% for opt in options %} | ||
<div class="form-check form-check-inline"> | ||
<input class="form-check-input" type="checkbox" name="{{ input_id }}" value="{{ opt.value }}" id="{{ input_id }}"> | ||
<label class="form-check-label" for="{{ input_id }}" title="{{ opt.info }}"> | ||
{{ opt.name }} | ||
{% if opt.hit %} | ||
<small class="text-secondary"> Use: {{opt.percentage}}%</small> | ||
{% endif %} | ||
</label> | ||
|
||
<!-- Modal --> | ||
<div class="modal fade" id="{{input_id}}OptionsSearchBox" data-input-id="{{ input_id }}" tabindex="-1" aria-labelledby="{{input_id}}OptionsSearchBoxModalLabel" aria-hidden="true"> | ||
<div class="modal-dialog"> | ||
<div class="modal-content"> | ||
<div class="modal-header"> | ||
<h2 class="modal-title fs-5" id="{{input_id}}OptionsSearchBoxModalLabel">Find {{input_id}} Prompts</h2> | ||
<button type="button" class="btn-close btn-sm" data-bs-dismiss="modal" aria-label="Close"></button> | ||
</div> | ||
<div class="modal-body"> | ||
<div class="mb-2"> | ||
<input class="form-control" type="text" id="{{input_id}}QueryInput" placeholder="type your prompt" /> | ||
</div> | ||
<div class="mb-1"> | ||
<button type="button" class="btn btn-outline-dark btn-sm mb-1 text-end" id="{{ input_id }}Btn" onclick="selectAllOptions('{{ input_id }}')"> | ||
Check All | ||
</button> | ||
<span id="modal-tips" class="text-end"></span> | ||
</div> | ||
<table class="table table-bordered table-sm"></table> | ||
</div> | ||
<div class="modal-footer"> | ||
<button type="button" class="btn btn-secondary btn-sm" data-bs-dismiss="modal">Close</button> | ||
</div> | ||
</div> | ||
</div> | ||
{% endfor %} | ||
</div> | ||
</div> | ||
<!-- options modal end --> | ||
|
||
|
||
<script> | ||
$(document).ready(function(e) { | ||
const inputId = "{{ input_id }}"; | ||
|
||
document.getElementById("{{ input_id }}OptionsSearchBox").addEventListener("shown.bs.modal", function(ev){ | ||
searchPrompts(inputId, ""); | ||
}); | ||
|
||
$("#{{ input_id }}OptionsSearchBox").find("#" + inputId + "QueryInput").bind("input", function(ev){ | ||
searchPrompts(inputId, ev.target.value); | ||
}); | ||
|
||
document.getElementById("{{ input_id }}OptionsSearchBox").addEventListener("hidden.bs.modal", function(ev){ | ||
showPromptResult(inputId); | ||
}); | ||
}); | ||
</script> |
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