diff options
| author | Robert | 2017-05-16 15:25:50 +0200 | 
|---|---|---|
| committer | Robert | 2017-05-16 15:25:50 +0200 | 
| commit | a13407895e44a0ccf2d485103d26fdcb3e38e478 (patch) | |
| tree | 07f9705c7d19efd99b0a29423d221130091a3e3e | |
| parent | a3d500c702b6b9e8f514a841af1386db86ffad6a (diff) | |
| parent | d97b5fe31c6f4ce6f3694437ab8f3b084914cd41 (diff) | |
| download | chouette-core-a13407895e44a0ccf2d485103d26fdcb3e38e478.tar.bz2 | |
Merge branch 'master' of github.com:af83/stif-boiv
| -rw-r--r-- | app/assets/javascripts/select2.coffee | 1 | ||||
| -rw-r--r-- | app/assets/stylesheets/components/_select2.sass | 8 | ||||
| -rw-r--r-- | app/views/time_tables/_filter.html.slim | 11 | 
3 files changed, 15 insertions, 5 deletions
| diff --git a/app/assets/javascripts/select2.coffee b/app/assets/javascripts/select2.coffee index 1870f7f9a..e8d9c313e 100644 --- a/app/assets/javascripts/select2.coffee +++ b/app/assets/javascripts/select2.coffee @@ -12,6 +12,7 @@      target.select2        theme: 'bootstrap'        language: 'fr' +      placeholder: target.data('select2ed-placeholder')        allowClear: true        tags: true diff --git a/app/assets/stylesheets/components/_select2.sass b/app/assets/stylesheets/components/_select2.sass index cbb3a80da..2a0863173 100644 --- a/app/assets/stylesheets/components/_select2.sass +++ b/app/assets/stylesheets/components/_select2.sass @@ -5,6 +5,7 @@  .select2-selection__placeholder    color: rgba($grey, 0.65)    font-style: italic +  padding: 0 6px  // With Font Awesome adjusts.  .select2-selection__rendered @@ -66,3 +67,10 @@      .select2-container--bootstrap .select2-selection        border-color: rgba($grey, 0.3) + +// Tags +.form-filter +  .form-group.select2ed +    .form-control.tags + .select2-container--bootstrap +      input.select2-search__field +        padding: 0 6px diff --git a/app/views/time_tables/_filter.html.slim b/app/views/time_tables/_filter.html.slim index d29c628a9..cee915911 100644 --- a/app/views/time_tables/_filter.html.slim +++ b/app/views/time_tables/_filter.html.slim @@ -7,12 +7,13 @@            span.fa.fa-search    .ffg-row -    .form-group.togglable -      = f.label @time_tables.human_attribute_name(:color), required: false, class: 'control-label' -      = f.input :color_cont_any, collection: ["#9B9B9B", "#FFA070", "#C67300", "#7F551B", "#41CCE3", "#09B09C", "#3655D7",   "#6321A0", "#E796C6", "#DD2DAA"], as: :check_boxes, label: false, label_method: lambda{|tt| ("<span style='height:19px;'><span class='fa fa-circle' style='position:relative;top:0;margin-top:0;color:" + tt + "'></span></span>").html_safe }, required: false, wrapper_html: { class: 'checkbox_list' } +    / .form-group.togglable +      / = f.label @time_tables.human_attribute_name(:color), required: false, class: 'control-label' +      / = f.input :color_cont_any, collection: ["#9B9B9B", "#FFA070", "#C67300", "#7F551B", "#41CCE3", "#09B09C", "#3655D7",   "#6321A0", "#E796C6", "#DD2DAA"], as: :check_boxes, label: false, label_method: lambda{|tt| ("<span style='height:19px;'><span class='fa fa-circle' style='position:relative;top:0;margin-top:0;color:" + tt + "'></span></span>").html_safe }, required: false, wrapper_html: { class: 'checkbox_list' } -      / = f.label @time_tables.human_attribute_name(:tag_search), required: false, class: 'control-label' -      / = f.input :tag_search, as: :tags, collection: Chouette::TimeTable.tags_on(:tags).pluck(:name), label: false, input_html: { 'data-select2ed': 'true', 'data-select2ed-placeholder': 'Indiquez une étiquette...' }, wrapper_html: { class: 'select2ed'}, include_blank: false +    .form-group +      = f.label @time_tables.human_attribute_name(:tag_search), required: false, class: 'control-label' +      = f.input :tag_search, as: :tags, collection: Chouette::TimeTable.tags_on(:tags).pluck(:name), label: false, input_html: { 'data-select2ed': 'true', 'data-select2ed-placeholder': 'Indiquez une étiquette...' }, wrapper_html: { class: 'select2ed'}, include_blank: false      .form-group.togglable        = f.label @time_tables.human_attribute_name(:bounding_dates), required: false, class: 'control-label' | 
