diff options
| author | jpl | 2017-05-16 15:23:38 +0200 |
|---|---|---|
| committer | jpl | 2017-05-16 15:24:04 +0200 |
| commit | d97b5fe31c6f4ce6f3694437ab8f3b084914cd41 (patch) | |
| tree | c77b941592d044ea3f400447f82033cec77ea1dd | |
| parent | ca98edfd6c66d24e6bb8ff5328816e0567fb05fc (diff) | |
| download | chouette-core-d97b5fe31c6f4ce6f3694437ab8f3b084914cd41.tar.bz2 | |
Refs #3400: removing color_filter, adding tag_filter
| -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' |
