0
1
Fork 0
hedera-web-mindshore/web/forms/admin/connections/connections.js

54 lines
854 B
JavaScript
Raw Normal View History

2015-12-10 23:24:14 +00:00
Vn.Connections = new Class
({
Extends: Vn.Form
,_timeoutId: null
,onModelStatusChange: function (model, status)
2015-12-10 23:24:14 +00:00
{
if (!model.ready)
return;
if (this._timeoutId)
clearTimeout (this._timeoutId);
this._timeoutId = setTimeout (this.onRefreshClick.bind (this), 60000);
2015-12-10 23:24:14 +00:00
}
,deactivate: function ()
{
clearTimeout (this._timeoutId);
2015-12-10 23:24:14 +00:00
}
,onRefreshClick: function ()
{
this.$('sessions').refresh ();
}
,onAccessLogClick: function (button, form)
{
this.hash.set ({
'form': 'admin/access-log'
,'user': form.get ('user_id')
});
}
,onChangeUserClick: function (button, form)
{
this.gui.supplantUser (form.get ('user_id'),
this.onUserSupplant.bind (this));
}
,onUserSupplant: function (userName)
{
this.hash.set ({'form': 'ecomerce/orders'});
}
,sessionsFunc: function ()
{
return 1;
}
});