КОНТРОЛЫ/suggest.md
Исходный код
Twig код
<div class="control-wrapper control--suggest {{class_name}}{% if list_separated %} control-suggest_separated{% endif %}"{% if wrapper_id %} id="{{wrapper_id}}"{% endif %} {{ additional_data|raw }}>
{% if suggest_icon %}
<span class="control--suggest--icon icon icon-{{suggest_icon}}"></span>
{% endif %}
{% if value_id is not defined %}
{% set value_id = "" %}
{% endif %}
{% set value_title = "" %}
<ul class="control--suggest--list js-control--suggest--list custom-scroll {{ list_class_name }}">
{% for v in items %}
<li data-value-id="{% if v.id %}{{v.id}}{% else %}{{v.value}}{% endif %}" class="control--suggest--list--item {% if (selected and (v.id == selected)) or (selected and (v.value == selected)) %}{% set value_id = v.id %}{% set value_title = v.value %}control--suggest--list--item-selected{% elseif not selected and (loop.index0 == 0) %}{% set value_id = v.id %}control--suggest--list--item-selected{% endif %} {{v.custom_class}}">
<span class="control--suggest--list--item-inner" title="{{v.value}}">{{v.value}}</span>
</li>
{% endfor %}
</ul>
{% if not selected and value|length and not selected_should_be_empty %}
{% set selected = value %}
{% endif %}
{% block input %}
<input data-enable-filter="{{disable_filter ? 'n' : 'y'}}" autocomplete="off" name="{{name}}" class="{% if not styled_input %}text-input{% endif %} control--suggest--input {% if ajax is defined %}js-control--suggest--input-ajax{% else %}js-control--suggest--input control--suggest--input-inline{% endif %} {{input_class_name}}" {% if id %}id="{{id}}"{% endif %} type="{{ input_type ? input_type : 'text' }}" placeholder="{{placeholder}}" value="{{value_title|default(selected)}}" data-value-id="{{ value_id }}" data-type="{{type}}" {% if ajax is defined %}data-url="{{ajax.url}}" data-params="{{ajax.params}}" data-headers="{{ajax.headers}}"{% endif %} {% if disabled %}disabled="disabled"{% endif %} {{additional_data|raw}} />
{% endblock %}
{% if ajax is not defined and items|length %}
<b class="control--suggest--down-btn"></b>
{% endif %}
{% if closable %}
<span id="search_clear_button" class="date_field--clear">
<span class="icon icon-inline icon-search-cancel"></span>
<span class="icon icon-inline js-search-hide icon-close"></span>
</span>
{% endif %}
</div>
Ссылка на вики репозиторий
- Страницы
- add_button
- budget
- button
- cancel_button
- chained_list
- checkbox
- checkboxes_dropdown
- checkboxes_dropdown_single
- checkboxes_string
- color_picker
- contenteditable
- date_field
- date_filter
- date_time_field
- deadline_select
- delete_button
- drive_field
- feed_note_main_buttons
- file
- input
- legal_entity
- line_toggler
- multiselect
- payer
- phone
- pipeline_toggler
- radio
- responsive_toggler
- select
- select_with_subtext
- smart_address
- status_chat
- suggest
- supplier
- switcher
- tags
- textarea
- textarea_code
- time
- time_field
- toggler
- updater
- users
- wysiwyg
Ссылка на вики репозиторий
- add_button
- budget
- button
- cancel_button
- chained_list
- checkbox
- checkboxes_dropdown
- checkboxes_dropdown_single
- checkboxes_string
- color_picker
- contenteditable
- date_field
- date_filter
- date_time_field
- deadline_select
- delete_button
- drive_field
- feed_note_main_buttons
- file
- input
- legal_entity
- line_toggler
- multiselect
- payer
- phone
- pipeline_toggler
- radio
- responsive_toggler
- select
- select_with_subtext
- smart_address
- status_chat
- suggest
- supplier
- switcher
- tags
- textarea
- textarea_code
- time
- time_field
- toggler
- updater
- users
- wysiwyg