fetchOnModelAfterRelate
This commit is contained in:
@@ -30,6 +30,8 @@ Espo.define('crm:views/target-list/record/panels/relationship', 'views/record/pa
|
||||
|
||||
return Dep.extend({
|
||||
|
||||
fetchOnModelAfterRelate: true,
|
||||
|
||||
actionOptOut: function (data) {
|
||||
if (confirm(this.translate('confirmation', 'messages'))) {
|
||||
$.ajax({
|
||||
|
||||
@@ -40,6 +40,8 @@ Espo.define('views/record/panels/relationship', ['views/record/panels/bottom', '
|
||||
|
||||
readOnly: false,
|
||||
|
||||
fetchOnModelAfterRelate: false,
|
||||
|
||||
init: function () {
|
||||
Dep.prototype.init.call(this);
|
||||
},
|
||||
@@ -138,6 +140,12 @@ Espo.define('views/record/panels/relationship', ['views/record/panels/bottom', '
|
||||
|
||||
this.setFilter(this.filter);
|
||||
|
||||
if (this.fetchOnModelAfterRelate) {
|
||||
this.listenToOnce(this.model, 'after:relate', function () {
|
||||
collection.fetch();
|
||||
}, this);
|
||||
}
|
||||
|
||||
var viewName = this.defs.recordListView || this.getMetadata().get('clientDefs.' + this.scope + '.recordViews.list') || 'Record.List';
|
||||
|
||||
this.once('after:render', function () {
|
||||
|
||||
Reference in New Issue
Block a user