From d696ca3013cdf5f8bbfb0e2ce99960ed0bb3dbeb Mon Sep 17 00:00:00 2001 From: yuri Date: Fri, 14 Aug 2015 11:46:16 +0300 Subject: [PATCH] returnUrl for list-edit --- frontend/client/src/views/record/list.js | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/frontend/client/src/views/record/list.js b/frontend/client/src/views/record/list.js index 8d6c5c122c..7992a98c0d 100644 --- a/frontend/client/src/views/record/list.js +++ b/frontend/client/src/views/record/list.js @@ -894,8 +894,7 @@ Espo.define('Views.Record.List', 'View', function (Dep) { this.createView('quickEdit', viewName, { scope: this.scope, id: id, - fullFormDisabled: d.noFullForm, - returnUrl: '#' + this.scope, + fullFormDisabled: d.noFullForm }, function (view) { view.once('after:render', function () { Espo.Ui.notify(false); @@ -912,7 +911,11 @@ Espo.define('Views.Record.List', 'View', function (Dep) { }.bind(this)); } else { - this.getRouter().navigate('#' + this.scope + '/edit/' + id, {trigger: true}); + this.getRouter().dispatch(this.scope, 'edit', { + id: id, + returnUrl: '#' + this.scope + }); + this.getRouter().navigate('#' + this.scope + '/edit/' + id, {trigger: false}); } },