projects
/
civicrm-core.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
61d869a
)
Trigger change after loading remote EntityRef default
author
Coleman Watts
<coleman@civicrm.org>
Sun, 20 Jul 2014 13:43:44 +0000
(14:43 +0100)
committer
Coleman Watts
<coleman@civicrm.org>
Sun, 20 Jul 2014 13:43:44 +0000
(14:43 +0100)
js/Common.js
patch
|
blob
|
blame
|
history
diff --git
a/js/Common.js
b/js/Common.js
index b13ad4289c346ef4eb6aa2e6bf6005fcc35e4321..8b8b3f462572f328adcdb1ae955664890ca5fd62 100644
(file)
--- a/
js/Common.js
+++ b/
js/Common.js
@@
-367,7
+367,9
@@
CRM.strings = CRM.strings || {};
} else {
var params = $.extend({}, $el.data('api-params') || {}, {id: val});
CRM.api3($el.data('api-entity'), 'getlist', params).done(function(result) {
- callback(multiple ? result.values : result.values[0])
+ callback(multiple ? result.values : result.values[0]);
+ // Trigger change (store data to avoid an infinite loop of lookups)
+ $el.data('entity-value', result.values).trigger('change');
});
}
}