From 5f1f0423cf6a979f0bf0a2fd2035b6410fa0420a Mon Sep 17 00:00:00 2001 From: Juan Ferrer Toribio Date: Wed, 16 Nov 2022 02:43:11 +0100 Subject: [PATCH] refs #3971 Webpack imports --- forms/admin/connections/index.js | 37 ++++++++++++++++++++++++++++++++ 1 file changed, 37 insertions(+) create mode 100644 forms/admin/connections/index.js diff --git a/forms/admin/connections/index.js b/forms/admin/connections/index.js new file mode 100644 index 00000000..66e93ab4 --- /dev/null +++ b/forms/admin/connections/index.js @@ -0,0 +1,37 @@ +import './style.scss'; + +export default new Class({ + Extends: Hedera.Form, + Template: require('./ui.xml') + + ,_timeoutId: null + + ,onModelStatusChange() { + if (!this.$.sessions.ready) + return; + + if (this._timeoutId) + clearTimeout(this._timeoutId); + + this._timeoutId = setTimeout( + () => this.$.sessions.refresh(), 60000); + } + + ,deactivate() { + clearTimeout(this._timeoutId); + } + + ,onChangeUserClick: function(userName) { + this.gui.supplantUser(userName, + this._onUserSupplant.bind(this)); + } + + ,_onUserSupplant() { + this.hash.setAll({form: 'ecomerce/orders'}); + } + + ,sessionsFunc() { + return 1; + } +}); +