app/assets/javascripts/crm.js.coffee in fat_free_crm-0.22.0 vs app/assets/javascripts/crm.js.coffee in fat_free_crm-0.22.1
- old
+ new
@@ -7,12 +7,12 @@
String::capitalize = ->
@[0].toUpperCase() + @.substring(1)
window.crm =
- EXPANDED: "▼"
- COLLAPSED: "►"
+ EXPANDED: "▽"
+ COLLAPSED: "▷"
searchRequest: null
autocompleter: null
base_url: ""
language: "en-US"
@@ -334,10 +334,13 @@
destination = $("#" + to + "_attributes_" + field)
@hide_hint destination, source.val() unless source.attr("hint") is "true"
# Country dropdown needs special treatment ;-)
country = $("#" + from + "_attributes_country").select2("data")
- $("#" + to + "_attributes_country").select2("data", country, true)
+ if country.length == 1
+ country_dropdown = $("#" + to + "_attributes_country")
+ country_dropdown.val(country[0].id)
+ country_dropdown.trigger('change')
#----------------------------------------------------------------------------
search: (query, controller) ->
list = controller # ex. "users"