fix change password

This commit is contained in:
Yuri Kuznetsov
2014-06-11 11:53:10 +03:00
parent fe0f5b3886
commit e27edf5b0d
2 changed files with 11 additions and 8 deletions
@@ -105,13 +105,9 @@ Espo.define('Views.Modals.ChangePassword', 'Views.Modal', function (Dep) {
this.$el.find('button[data-name="change"]').removeClass('disabled');
}.bind(this)
}).done(function () {
Espo.Ui.success(this.translate('passwordChanged', 'messages', 'User'));
setTimeout(function () {
this.getBaseController().logout();
this.close();
}.bind(this), 2000);
Espo.Ui.success(this.translate('passwordChanged', 'messages', 'User'));
this.trigger('changed');
this.close();
}.bind(this));
},
@@ -71,6 +71,13 @@ Espo.define('Views.User.Record.Detail', 'Views.Record.Detail', function (Dep) {
}, function (view) {
view.render();
this.notify(false);
this.listenToOnce(view, 'changed', function () {
setTimeout(function () {
this.getBaseController().logout();
}.bind(this), 2000);
}, this);
}.bind(this));
},
@@ -93,7 +100,7 @@ Espo.define('Views.User.Record.Detail', 'Views.Record.Detail', function (Dep) {
model: this.model,
}, function (view) {
this.notify(false);
view.render();
view.render();
}.bind(this));
}.bind(this));