Skip to content

Commit

Permalink
Merge branch 'master' into fix-load-paths
Browse files Browse the repository at this point in the history
  • Loading branch information
CloCkWeRX authored Feb 24, 2024
2 parents 9ed211c + 1ef260b commit 3e2c61d
Show file tree
Hide file tree
Showing 4 changed files with 8 additions and 4 deletions.
5 changes: 4 additions & 1 deletion app/assets/javascripts/crm_select2.js.coffee
Original file line number Diff line number Diff line change
Expand Up @@ -15,23 +15,26 @@
$(this).select2
'width':'resolve'
placeholder: $(this).attr("placeholder")
allowClear: true
ajax:
url: $(this).data("url")
dataType: 'json'
else
$(this).select2
'width':'resolve'
placeholder: $(this).attr("placeholder")
allowClear: true

if $(this).prop("disabled") == true
$(this).next('.select2-container').disable()
$(this).next('.select2-container').hide()
$(this).next('.select2-container').hide()

$(".select2_tag").not(".select2-container, .select2-offscreen").each ->
$(this).select2
'width':'resolve'
placeholder: $(this).data("placeholder")
multiple: $(this).data("multiple")
allowClear: true

$(document).ready ->
crm.make_select2()
Expand Down
2 changes: 1 addition & 1 deletion app/views/shared/_address.html.haml
Original file line number Diff line number Diff line change
Expand Up @@ -41,4 +41,4 @@
= address_field(a, :zipcode, "width:80px;")
%td= spacer
%td
= a.country_select(:country, priority_countries: priority_countries, include_blank: "", :"data-placeholder" => t(:select_a_country), style: "width:150px; margin-top:6px", class: 'select2')
= a.country_select(:country, {priority_countries: priority_countries, include_blank: true}, {data: { placeholder: t(:select_a_country)}, class: 'select2'})
2 changes: 1 addition & 1 deletion config/initializers/custom_field_ransack_translations.rb
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
#------------------------------------------------------------------------------
# Load field names for custom fields, for Ransack search
require 'setting'
if Setting.database_and_table_exists?
if Setting.database_and_table_exists? && ActiveRecord::Base.connection.table_exists?(:custom_fields)
Rails.application.config.after_initialize do
I18n.backend.load_translations

Expand Down
3 changes: 2 additions & 1 deletion config/settings.default.yml
Original file line number Diff line number Diff line change
Expand Up @@ -192,7 +192,8 @@
#------------------------------------------------------------------------------
# Specify which countries (if any) should appear at the top of country pickers
# priority_countries:
# - Burkina Faso
# - AU
# - BF

# Main and Admin Tabs
#------------------------------------------------------------------------------
Expand Down

0 comments on commit 3e2c61d

Please sign in to comment.