fix return
This commit is contained in:
@@ -103,6 +103,9 @@ Espo.define('views/detail', 'views/main', function (Dep) {
|
||||
this.optionsToPass.forEach(function (option) {
|
||||
o[option] = this.options[option];
|
||||
}, this);
|
||||
if (this.options.params && this.options.params.rootUrl) {
|
||||
o.rootUrl = this.options.params.rootUrl;
|
||||
}
|
||||
this.createView('record', this.getRecordViewName(), o);
|
||||
},
|
||||
|
||||
|
||||
@@ -69,6 +69,9 @@ Espo.define('views/edit', 'views/main', function (Dep) {
|
||||
this.optionsToPass.forEach(function (option) {
|
||||
o[option] = this.options[option];
|
||||
}, this);
|
||||
if (this.options.params && this.options.params.rootUrl) {
|
||||
o.rootUrl = this.options.params.rootUrl;
|
||||
}
|
||||
this.createView('record', this.getRecordViewName(), o);
|
||||
},
|
||||
|
||||
|
||||
@@ -1197,7 +1197,12 @@ Espo.define('views/record/detail', ['views/record/base', 'view-record-helper'],
|
||||
exitAfterCreate: function () {
|
||||
if (this.model.id) {
|
||||
var url = '#' + this.scope + '/view/' + this.model.id;
|
||||
this.getRouter().navigate(url, {trigger: true});
|
||||
|
||||
this.getRouter().navigate(url, {trigger: false});
|
||||
this.getRouter().dispatch(this.scope, 'view', {
|
||||
id: this.model.id,
|
||||
rootUrl: this.options.rootUrl
|
||||
});
|
||||
return true;
|
||||
}
|
||||
},
|
||||
|
||||
Reference in New Issue
Block a user