mirror of
https://github.com/EGroupware/egroupware.git
synced 2025-08-16 03:34:48 +02:00
Handle logout onClick handler for superuser button in filemanager file dialog
This commit is contained in:
@ -773,5 +773,32 @@ app.classes.filemanager = AppJS.extend(
|
||||
event.preventDefault();
|
||||
event.stopPropagation();
|
||||
return false;
|
||||
},
|
||||
|
||||
/**
|
||||
* Set Sudo button's label and change its onclick handler according to its action
|
||||
*
|
||||
* @param {widget object} _widget sudo buttononly
|
||||
* @param {string} _action string of action type {login|logout}
|
||||
*/
|
||||
set_sudoButton: function (_widget, _action)
|
||||
{
|
||||
var widget = _widget || this.et2.getWidgetById('sudouser');
|
||||
if (widget)
|
||||
{
|
||||
switch (_action)
|
||||
{
|
||||
case 'login':
|
||||
widget.set_label('Logout');
|
||||
this.et2._inst.submit(widget);
|
||||
break;
|
||||
|
||||
default:
|
||||
widget.set_label('Superuser');
|
||||
widget.onclick = function(){
|
||||
jQuery('.superuser').css('display','inline');
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
});
|
||||
|
Reference in New Issue
Block a user