2015-12-10 23:24:14 +00:00
|
|
|
|
2022-05-05 13:56:17 +00:00
|
|
|
Hedera.Connections = new Class({
|
2016-09-26 09:28:47 +00:00
|
|
|
Extends: Hedera.Form
|
2015-12-10 23:24:14 +00:00
|
|
|
|
2015-12-15 15:22:46 +00:00
|
|
|
,_timeoutId: null
|
|
|
|
|
2022-05-24 21:11:12 +00:00
|
|
|
,onModelStatusChange: function() {
|
2022-05-28 01:18:06 +00:00
|
|
|
if (!this.$.sessions.ready)
|
2015-12-15 15:22:46 +00:00
|
|
|
return;
|
|
|
|
|
|
|
|
if (this._timeoutId)
|
2022-05-05 13:56:17 +00:00
|
|
|
clearTimeout(this._timeoutId);
|
2015-12-15 15:22:46 +00:00
|
|
|
|
2022-05-25 18:04:16 +00:00
|
|
|
this._timeoutId = setTimeout(
|
2022-05-28 01:18:06 +00:00
|
|
|
() => this.$.sessions.refresh(), 60000);
|
2015-12-10 23:24:14 +00:00
|
|
|
}
|
|
|
|
|
2022-05-05 13:56:17 +00:00
|
|
|
,deactivate: function() {
|
|
|
|
clearTimeout(this._timeoutId);
|
2015-12-10 23:24:14 +00:00
|
|
|
}
|
|
|
|
|
2022-05-24 21:11:12 +00:00
|
|
|
,onChangeUserClick: function(userName) {
|
|
|
|
this.gui.supplantUser(userName,
|
2022-05-05 13:56:17 +00:00
|
|
|
this._onUserSupplant.bind(this));
|
2015-12-10 23:24:14 +00:00
|
|
|
}
|
|
|
|
|
2022-05-05 13:56:17 +00:00
|
|
|
,_onUserSupplant: function() {
|
2022-05-30 01:30:33 +00:00
|
|
|
this.hash.setAll({form: 'ecomerce/orders'});
|
2015-12-10 23:24:14 +00:00
|
|
|
}
|
|
|
|
|
2022-05-05 13:56:17 +00:00
|
|
|
,sessionsFunc: function() {
|
2015-12-10 23:24:14 +00:00
|
|
|
return 1;
|
|
|
|
}
|
|
|
|
});
|
|
|
|
|