diff options
author | Gergely Csatari <gergely.csatari@nokia.com> | 2023-10-26 10:33:28 +0300 |
---|---|---|
committer | Gergely Csatari <gergely.csatari@nokia.com> | 2023-10-26 10:34:28 +0300 |
commit | 2ec0d7b9f5c1354977b821c6b06c24a3ffa13142 (patch) | |
tree | 6e449d92ddfc880ed007e9d8a8f25bda8fc7cb0f /src/templates/base/dashboard/searchable_select_multiple.html | |
parent | 0d3dd290aa6e7f39e7b0b3cbe448b6622f924240 (diff) |
that the development continues in GitHub
Change-Id: I25c58a679dbf92b2367d826429b7cda936bf9f0e
Signed-off-by: Gergely Csatari <gergely.csatari@nokia.com>
Diffstat (limited to 'src/templates/base/dashboard/searchable_select_multiple.html')
-rw-r--r-- | src/templates/base/dashboard/searchable_select_multiple.html | 73 |
1 files changed, 0 insertions, 73 deletions
diff --git a/src/templates/base/dashboard/searchable_select_multiple.html b/src/templates/base/dashboard/searchable_select_multiple.html deleted file mode 100644 index 4d996e5..0000000 --- a/src/templates/base/dashboard/searchable_select_multiple.html +++ /dev/null @@ -1,73 +0,0 @@ -<div id="search_select_outer" class="d-flex flex-column"> - {% if incompatible == "true" %} - <div class="alert alert-danger alertAnuket" role="alert"> - <h3>Warning: Incompatible Configuration</h3> - <p>Please make a different selection, as the current config conflicts with the selected pod</p> - </div> - {% endif %} - <div id="added_counter" class="text-center"> - <span id="added_number">0</span> - <span id="addable_limit">/ {% if selectable_limit > -1 %} {{ selectable_limit }} {% else %} ∞ {% endif %}added</span> - </div> - - <div id="added_list" class="pb-2"> - - </div> - - <input id="user_field" name="ignore_this" class="form-control" autocomplete="off" type="text" placeholder="{{placeholder}}" value="" oninput="searchable_select_multiple_widget.search(this.value)" - {% if disabled %} disabled {% endif %}> - - <input type="hidden" id="selector" name="{{ name }}" class="form-control d-none" - {% if disabled %} disabled {% endif %}> - - <div id="scroll_restrictor" class="d-flex pb-4 position-relative"> - <div id="drop_results" class="list-group w-100 z-2 overflow-auto position-absolute mh-30vh"></div> - </div> -</div> - -<script type="text/javascript"> - function searchableSelectMultipleWidgetEntry() { - let format_vars = { - "show_from_noentry": {{show_from_noentry|yesno:"true,false"}}, - "show_x_results": {{show_x_results|default:-1}}, - "results_scrollable": {{results_scrollable|yesno:"true,false"}}, - "selectable_limit": {{selectable_limit|default:-1}}, - "placeholder": "{{placeholder|default:"begin typing"}}" - }; - - let field_dataset = {{items|safe}}; - - let field_initial = {{ initial|safe }}; - - //global - searchable_select_multiple_widget = new SearchableSelectMultipleWidget(format_vars, field_dataset, field_initial); - } - - searchableSelectMultipleWidgetEntry(); - - /* - var show_from_noentry = context(show_from_noentry|yesno:"true,false") // whether to show any results before user starts typing - var show_x_results = context(show_x_results|default:-1) // how many results to show at a time, -1 shows all results - var results_scrollable = {{results_scrollable|yesno:"true,false") // whether list should be scrollable - var selectable_limit = {{selectable_limit|default:-1) // how many selections can be made, -1 allows infinitely many - var placeholder = "context(placeholder|default:"begin typing")" // placeholder that goes in text box - - needed info - var items = context(items|safe) // items to add to trie. Type is a dictionary of dictionaries with structure: - { - id# : { - "id": any, identifiable on backend - "small_name": string, displayed first (before separator), searchable (use for e.g. username) - "expanded_name": string, displayed second (after separator), searchable (use for e.g. email address) - "string": string, not displayed, still searchable - } - } - - used later: - context(selectable_limit): changes what number displays for field - context(name): form identifiable name, relevant for backend - // when submitted, form will contain field data in post with name as the key - context(placeholder): "greyed out" contents put into search field initially to guide user as to what they're searching for - context(initial): in search_field_init(), marked safe, an array of id's each referring to an id from items - */ -</script> |