diff options
| author | Christophe Simonis <chs@openerp.com> | 2012-08-02 17:47:49 +0200 |
|---|---|---|
| committer | Christophe Simonis <chs@openerp.com> | 2012-08-02 17:47:49 +0200 |
| commit | 2f9da3ba1e08db8e680df3d9e0a1056eb31fab22 (patch) | |
| tree | 550ebcc55e8027ad3dee0dc78384e35d8eb6794c /addons/anonymous/static/src | |
| parent | 6b23be4a25db4a869d918360c15aadd9e61c66fa (diff) | |
[IMP] rename module "anonymous" to "auth_anonymous" + recategorize auth modules
bzr revid: chs@openerp.com-20120802154749-rl2240e8fak1457q
Diffstat (limited to 'addons/anonymous/static/src')
| -rw-r--r-- | addons/anonymous/static/src/js/anonymous.js | 47 | ||||
| -rw-r--r-- | addons/anonymous/static/src/xml/anonymous.xml | 15 |
2 files changed, 0 insertions, 62 deletions
diff --git a/addons/anonymous/static/src/js/anonymous.js b/addons/anonymous/static/src/js/anonymous.js deleted file mode 100644 index 5140429d030..00000000000 --- a/addons/anonymous/static/src/js/anonymous.js +++ /dev/null @@ -1,47 +0,0 @@ -openerp.anonymous = function(instance) { - - instance.web.Login.include({ - start: function() { - var self = this; - return $.when(this._super()).pipe(function() { - var dblist = self._db_list || []; - if (!self.session.session_is_valid() && dblist.length === 1) { - self.remember_credentials = false; - // XXX get login/pass from server (via a rpc call) ? - return self.do_login(dblist[0], 'anonymous', 'anonymous') - } - - }); - }, - }); - - instance.web.UserMenu.include({ - init: function(parent) { - this._super(parent); - if (this.session.username == 'anonymous') { - this.template = 'UserMenu.anonymous'; - this.do_update = function() {}; // avoid change of avatar - } - }, - start: function() { - var self = this; - this._super.apply(this, arguments); - this.$element.find('.oe_topbar_anonymous_login').click(function() { - var p = self.getParent(); - var am = p.action_manager; - p.$element.find('.oe_leftbar').hide(); - am.do_action({ - type:'ir.actions.client', - tag:'login', - target: 'new', - params: { - login_successful: function() { - am.do_action("reload"); - } - } - }); - }); - } - }); - -}; diff --git a/addons/anonymous/static/src/xml/anonymous.xml b/addons/anonymous/static/src/xml/anonymous.xml deleted file mode 100644 index 7429efff458..00000000000 --- a/addons/anonymous/static/src/xml/anonymous.xml +++ /dev/null @@ -1,15 +0,0 @@ -<?xml version="1.0" encoding="UTF-8"?> -<!-- vim:fdl=1: ---> -<templates id="template" xml:space="preserve"> - -<t t-name="UserMenu.anonymous"> - <div> - <a href="#" class="oe_user_menu oe_topbar_item oe_topbar_anonymous_login"> - <img class="oe_topbar_avatar" t-att-src="_s + '/web/static/src/img/icons/gtk-dialog-authentication.png'"/> - Login - </a> - </div> -</t> - -</templates> |
