mirror of
https://github.com/scinote-eln/scinote-web.git
synced 2025-02-06 06:56:54 +08:00
Merge pull request #167 from okriuchykhin/ok_SCI-470
Fix issue with long tags in dropdown list [fixes SCI-470]
This commit is contained in:
commit
4f0fb7074b
3 changed files with 4 additions and 2 deletions
|
@ -63,7 +63,7 @@
|
|||
<%= bootstrap_form_for [@my_module, @new_mmt], remote: true, format: :json, html: { class: 'add-tag-form' } do |f| %>
|
||||
<div class="col-xs-6">
|
||||
<div class="well well-sm">
|
||||
<%= collection_select(:my_module_tag, :tag_id, @unassigned_tags, :id, :name, {}, { class: 'selectpicker' }) %>
|
||||
<%= collection_select(:my_module_tag, :tag_id, @unassigned_tags.collect{ |t| t.name = t.name.truncate(DROPDOWN_TEXT_MAX_LENGTH, omission: '...'); t }, :id, :name, {}, { class: 'selectpicker' }) %>
|
||||
<%= f.button class: 'btn btn-primary' do %>
|
||||
<span class="glyphicon glyphicon-plus"></span>
|
||||
<span class="hidden-xs"><%= t("experiments.canvas.modal_manage_tags.create") %></span>
|
||||
|
|
|
@ -11,4 +11,4 @@
|
|||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
|
|
@ -38,6 +38,8 @@ TABLE_JSON_MAX_SIZE = 20
|
|||
FILE_MAX_SIZE = 50
|
||||
# Max uploaded user avatar size in MB
|
||||
AVATAR_MAX_SIZE = 0.2
|
||||
# Max characters for text in dropdown list
|
||||
DROPDOWN_TEXT_MAX_LENGTH = 15
|
||||
|
||||
SEARCH_LIMIT = 20
|
||||
|
||||
|
|
Loading…
Reference in a new issue