]> git.argeo.org Git - lgpl/argeo-commons.git/blob - security/runtime/org.argeo.security.ria/src/argeo-ria-lib/security/class/org/argeo/security/ria/components/UserEditorPrefPane.js
ae1dbb3eb58f3c2c9158bab47de1f58b8bb9b0db
[lgpl/argeo-commons.git] / security / runtime / org.argeo.security.ria / src / argeo-ria-lib / security / class / org / argeo / security / ria / components / UserEditorPrefPane.js
1 qx.Class.define("org.argeo.security.ria.components.UserEditorPrefPane", {
2
3 extend : org.argeo.security.ria.components.UserEditor,
4 implement : [org.argeo.ria.components.IPreferencePane],
5
6 construct : function(){
7 this.base(arguments);
8 this.initGUI();
9 this.basicGB.setVisibility("excluded");
10 var saveButton = new qx.ui.form.Button("Save", "org.argeo.security.ria/document-save.png");
11 saveButton.addListener("execute", this.saveUser, this);
12 this.buttonGB.add(saveButton);
13 var authService = org.argeo.ria.session.AuthService.getInstance();
14 this.loadUserData(authService.getUser());
15 authService.addListener("changeUser", function(){
16 if(authService.getUser() == "anonymous"){
17 this.clearUserData();
18 }else{
19 this.loadUserData(authService.getUser());
20 }
21 }, this);
22 },
23
24 members : {
25 // IPrefPane Implementation
26 getPrefPane : function(){
27 return new qx.ui.container.Scroll(this);
28 },
29
30 getPrefLabel : function(){
31 return "User data";
32 },
33
34 getPrefIcon : function(){
35 return "org.argeo.security.ria/preferences-users.png";
36 }
37 }
38 });