Ignore:
Timestamp:
02/20/12 16:27:19 (13 years ago)
Author:
hendrikvanantwerpen
Message:
  • [Client] Moved pages in subtree of rft/, allowing controllers next to them.
  • [Client] Created questions page, gives overview and allows adding.
  • [Client] Page controllers inherit from _Page, because the previous mechanism w

asn't working.

  • [Client] Added new user registration.
  • [Server] Changed user passwords to passwordHash/passwordSalt combination.
  • [Server] Added simple object marshalling and unmarshalling to preserve types.
  • [Server] Added ResearchToolObjectInterface? with static create() method. Implemented for all model classes.
File:
1 edited

Legend:

Unmodified
Added
Removed
  • Dev/branches/rest-dojo-ui/client/rft/ui/LoginDialog.js

    r263 r274  
    66            templateString: template,
    77            widgetsInTemplate: true,
    8             title: "Login",
     8            title: "Login/Register",
    99            baseClass: "rftLoginDialog",
    1010            startup: function() {
     
    2020                this.loginErrors.innerHTML = '';
    2121                var data = this.loginForm.get('value');
    22                 auth.login(data.username,data.password)
     22                auth.login(data.email,data.password)
    2323                .then(lang.hitch(this,function() {
    2424                    this.hide();
     
    2929                event.stop(evt);
    3030                return false;
     31            },
     32            onRegister: function() {
     33                this.loginErrors.innerHTML = '';
     34                var data = this.loginForm.get('value');
     35                auth.register(data.email,data.password)
     36                .then(lang.hitch(this,function() {
     37                    this.hide();
     38                    content.initial();
     39                }),lang.hitch(this,function() {
     40                    this.loginErrors.innerHTML = 'Register failed.';
     41                }));
    3142            }
    3243        });
Note: See TracChangeset for help on using the changeset viewer.