diff options
| author | Luc Donnet | 2018-01-11 22:34:38 +0100 |
|---|---|---|
| committer | GitHub | 2018-01-11 22:34:38 +0100 |
| commit | 70d58e54fa18ee5d627b21d0f31673b4ed1250b5 (patch) | |
| tree | 6c4e7308f91d10579ea4791b2fc7a3169e35ab93 | |
| parent | f2f3302307dd51504855573a29a64ae694b55a37 (diff) | |
| parent | 793ba0b0ccdff2078f613c23a407dad9d2aff5ce (diff) | |
| download | chouette-core-70d58e54fa18ee5d627b21d0f31673b4ed1250b5.tar.bz2 | |
Merge pull request #231 from af83/5557-fix-calendar-creation
Refs #5557 @0.5h; Fix select2
| -rw-r--r-- | app/assets/javascripts/select2.coffee | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/app/assets/javascripts/select2.coffee b/app/assets/javascripts/select2.coffee index 4cf5f42d0..05b73dc6b 100644 --- a/app/assets/javascripts/select2.coffee +++ b/app/assets/javascripts/select2.coffee @@ -27,9 +27,9 @@ bind_select2_ajax = (el, cfg = {}) -> item.text escapeMarkup: (markup) -> markup - initSelection : (item, callback) -> - if _this.data('initvalue') - callback(_this.data('initvalue')) + + if _this.data('initvalue') + cfg["initSelection"] = (item, callback) -> callback(_this.data('initvalue')) bind_select2(el, cfg) |
