Christophe (OpenERP) has proposed merging 
lp:~openerp-dev/openerp-web/trunk-login-nivification-chs into lp:openerp-web.

Requested reviews:
  OpenERP R&D Web Team (openerp-dev-web)

For more details, see:
https://code.launchpad.net/~openerp-dev/openerp-web/trunk-login-nivification-chs/+merge/77127
-- 
https://code.launchpad.net/~openerp-dev/openerp-web/trunk-login-nivification-chs/+merge/77127
Your team OpenERP R&D Team is subscribed to branch 
lp:~openerp-dev/openerp-web/trunk-login-nivification-chs.
=== modified file 'addons/web/static/src/js/chrome.js'
--- addons/web/static/src/js/chrome.js	2011-09-26 10:14:40 +0000
+++ addons/web/static/src/js/chrome.js	2011-09-27 09:35:53 +0000
@@ -463,6 +463,9 @@
 
 openerp.web.Login =  openerp.web.Widget.extend(/** @lends openerp.web.Login# */{
     remember_creditentials: true,
+    
+    template: "Login",
+    identifier_prefix: 'oe-app-login-',
     /**
      * @constructs openerp.web.Login
      * @extends openerp.web.Widget
@@ -471,8 +474,8 @@
      * @param element_id
      */
 
-    init: function(parent, element_id) {
-        this._super(parent, element_id);
+    init: function(parent) {
+        this._super(parent);
         this.has_local_storage = typeof(localStorage) != 'undefined';
         this.selected_db = null;
         this.selected_login = null;
@@ -487,17 +490,7 @@
     },
     start: function() {
         var self = this;
-        this.rpc("/web/database/get_list", {}, function(result) {
-            self.db_list = result.db_list;
-            self.display();
-        }, function() {
-            self.display();
-        });
-    },
-    display: function() {
-        var self = this;
 
-        this.$element.html(QWeb.render("Login", this));
         this.database = new openerp.web.Database(
                 this, "oe_database", "oe_db_options");
 
@@ -506,6 +499,10 @@
         });
 
         this.$element.find("form").submit(this.on_submit);
+
+        this.rpc("/web/database/get_list", {}, function(result) {
+            self.db_list = result.db_list;
+        });
     },
     on_login_invalid: function() {
         this.$element.closest(".openerp").addClass("login-mode");
@@ -933,7 +930,7 @@
         openerp.web.Widget.prototype.notification = new openerp.web.Notification(this, "oe_notification");
 
         this.header = new openerp.web.Header(this);
-        this.login = new openerp.web.Login(this, "oe_login");
+        this.login = new openerp.web.Login(this);
         this.header.on_logout.add(this.login.on_logout);
         this.header.on_action.add(this.on_menu_action);
 
@@ -952,9 +949,9 @@
     },
     start: function() {
         this.header.appendTo($("#oe_header"));
+        this.login.appendTo($('#oe_login'));
+        this.menu.start();
         this.session.start();
-        this.login.start();
-        this.menu.start();
     },
     on_logged: function() {
         if(this.action_manager)

_______________________________________________
Mailing list: https://launchpad.net/~openerp-dev-gtk
Post to     : [email protected]
Unsubscribe : https://launchpad.net/~openerp-dev-gtk
More help   : https://help.launchpad.net/ListHelp

Reply via email to