hedera-web/forms/admin/connections/connections.js

46 lines
812 B
JavaScript
Raw Normal View History

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
,_timeoutId: null
2022-05-05 13:56:17 +00:00
,onModelStatusChange: function(model) {
if (!model.ready)
return;
if (this._timeoutId)
2022-05-05 13:56:17 +00:00
clearTimeout(this._timeoutId);
2022-05-05 13:56:17 +00:00
this._timeoutId = setTimeout(this.onRefreshClick.bind(this), 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-05 13:56:17 +00:00
,onRefreshClick: function() {
this.$('sessions').refresh();
2015-12-10 23:24:14 +00:00
}
2022-05-05 13:56:17 +00:00
,onAccessLogClick: function(button, form) {
this.hash.set({
form: 'admin/access-log'
,user: form.get('userId')
2015-12-10 23:24:14 +00:00
});
}
2022-05-05 13:56:17 +00:00
,onChangeUserClick: function(button, form) {
this.gui.supplantUser(form.get('user'),
this._onUserSupplant.bind(this));
2015-12-10 23:24:14 +00:00
}
2022-05-05 13:56:17 +00:00
,_onUserSupplant: function() {
this.hash.set({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;
}
});