Holger Brunn
11 years ago
6 changed files with 166 additions and 0 deletions
-
20auth_from_http_basic_logout/__init__.py
-
52auth_from_http_basic_logout/__openerp__.py
-
23auth_from_http_basic_logout/i18n/auth_from_http_basic_logout.pot
-
23auth_from_http_basic_logout/i18n/nl.po
-
BINauth_from_http_basic_logout/static/src/img/icon.png
-
48auth_from_http_basic_logout/static/src/js/auth_from_http_basic_logout.js
@ -0,0 +1,20 @@ |
|||
# -*- coding: utf-8 -*- |
|||
############################################################################## |
|||
# |
|||
# OpenERP, Open Source Management Solution |
|||
# This module copyright (C) 2014 Therp BV (<http://therp.nl>). |
|||
# |
|||
# This program is free software: you can redistribute it and/or modify |
|||
# it under the terms of the GNU Affero General Public License as |
|||
# published by the Free Software Foundation, either version 3 of the |
|||
# License, or (at your option) any later version. |
|||
# |
|||
# This program is distributed in the hope that it will be useful, |
|||
# but WITHOUT ANY WARRANTY; without even the implied warranty of |
|||
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
|||
# GNU Affero General Public License for more details. |
|||
# |
|||
# You should have received a copy of the GNU Affero General Public License |
|||
# along with this program. If not, see <http://www.gnu.org/licenses/>. |
|||
# |
|||
############################################################################## |
@ -0,0 +1,52 @@ |
|||
# -*- coding: utf-8 -*- |
|||
############################################################################## |
|||
# |
|||
# OpenERP, Open Source Management Solution |
|||
# This module copyright (C) 2014 Therp BV (<http://therp.nl>). |
|||
# |
|||
# This program is free software: you can redistribute it and/or modify |
|||
# it under the terms of the GNU Affero General Public License as |
|||
# published by the Free Software Foundation, either version 3 of the |
|||
# License, or (at your option) any later version. |
|||
# |
|||
# This program is distributed in the hope that it will be useful, |
|||
# but WITHOUT ANY WARRANTY; without even the implied warranty of |
|||
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
|||
# GNU Affero General Public License for more details. |
|||
# |
|||
# You should have received a copy of the GNU Affero General Public License |
|||
# along with this program. If not, see <http://www.gnu.org/licenses/>. |
|||
# |
|||
############################################################################## |
|||
{ |
|||
"name" : "Authenticate via HTTP basic authentication (logout helper)", |
|||
"version" : "1.0", |
|||
"author" : "Therp BV", |
|||
"complexity": "expert", |
|||
"description": """ |
|||
With auth_from_http_basic, the logout procedure has to be bent a bit to provide |
|||
a good user experience. As the former has to be a server wide module, this is |
|||
the clientside complement which provides the javascript part. |
|||
|
|||
The addon has to be installed in the database in use. |
|||
""", |
|||
"category" : "", |
|||
"depends" : [ |
|||
'web', |
|||
'auth_from_http_basic', |
|||
], |
|||
"data" : [ |
|||
], |
|||
"js": [ |
|||
'static/src/js/auth_from_http_basic_logout.js', |
|||
], |
|||
"css": [ |
|||
], |
|||
"qweb": [ |
|||
], |
|||
"auto_install": False, |
|||
"installable": True, |
|||
"external_dependencies" : { |
|||
'python' : [], |
|||
}, |
|||
} |
@ -0,0 +1,23 @@ |
|||
# Translation of OpenERP Server. |
|||
# This file contains the translation of the following modules: |
|||
# |
|||
msgid "" |
|||
msgstr "" |
|||
"Project-Id-Version: OpenERP Server 7.0\n" |
|||
"Report-Msgid-Bugs-To: \n" |
|||
"POT-Creation-Date: 2014-01-18 16:31+0000\n" |
|||
"PO-Revision-Date: 2014-01-18 16:31+0000\n" |
|||
"Last-Translator: <>\n" |
|||
"Language-Team: \n" |
|||
"MIME-Version: 1.0\n" |
|||
"Content-Type: text/plain; charset=UTF-8\n" |
|||
"Content-Transfer-Encoding: \n" |
|||
"Plural-Forms: \n" |
|||
|
|||
#. module: auth_from_http_basic_logout |
|||
#. openerp-web |
|||
#: code:addons/auth_from_http_basic_logout/static/src/js/auth_from_http_basic_logout.js:37 |
|||
#, python-format |
|||
msgid "<p style=\"background: white\">You have been logged out successfully. <a href=\"#\">Click here to log in again.</a></p>" |
|||
msgstr "" |
|||
|
@ -0,0 +1,23 @@ |
|||
# Translation of OpenERP Server. |
|||
# This file contains the translation of the following modules: |
|||
# |
|||
msgid "" |
|||
msgstr "" |
|||
"Project-Id-Version: OpenERP Server 7.0\n" |
|||
"Report-Msgid-Bugs-To: \n" |
|||
"POT-Creation-Date: 2014-01-18 16:31+0000\n" |
|||
"PO-Revision-Date: 2014-01-18 16:31+0000\n" |
|||
"Last-Translator: <>\n" |
|||
"Language-Team: \n" |
|||
"MIME-Version: 1.0\n" |
|||
"Content-Type: text/plain; charset=UTF-8\n" |
|||
"Content-Transfer-Encoding: \n" |
|||
"Plural-Forms: \n" |
|||
|
|||
#. module: auth_from_http_basic_logout |
|||
#. openerp-web |
|||
#: code:addons/auth_from_http_basic_logout/static/src/js/auth_from_http_basic_logout.js:37 |
|||
#, python-format |
|||
msgid "<p style=\"background: white\">You have been logged out successfully. <a href=\"#\">Click here to log in again.</a></p>" |
|||
msgstr "<p style=\"background: white\">U bent afgemeld. <a href=\"#\">Klik hier om weer in te loggen.</a></p>" |
|||
|
After Width: 80 | Height: 80 | Size: 1.1 KiB |
@ -0,0 +1,48 @@ |
|||
//-*- coding: utf-8 -*-
|
|||
//############################################################################
|
|||
//
|
|||
// OpenERP, Open Source Management Solution
|
|||
// This module copyright (C) 2014 Therp BV (<http://therp.nl>).
|
|||
//
|
|||
// This program is free software: you can redistribute it and/or modify
|
|||
// it under the terms of the GNU Affero General Public License as
|
|||
// published by the Free Software Foundation, either version 3 of the
|
|||
// License, or (at your option) any later version.
|
|||
//
|
|||
// This program is distributed in the hope that it will be useful,
|
|||
// but WITHOUT ANY WARRANTY; without even the implied warranty of
|
|||
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
|||
// GNU Affero General Public License for more details.
|
|||
//
|
|||
// You should have received a copy of the GNU Affero General Public License
|
|||
// along with this program. If not, see <http://www.gnu.org/licenses/>.
|
|||
//
|
|||
//############################################################################
|
|||
|
|||
openerp.auth_from_http_basic_logout = function(openerp) |
|||
{ |
|||
openerp.web.Session.include({ |
|||
session_logout: function() |
|||
{ |
|||
var deferred = this._super(this, arguments); |
|||
deferred.fail(function(error, ev) |
|||
{ |
|||
ev.preventDefault(); |
|||
openerp.web.blockUI(); |
|||
jQuery('.openerp_webclient_container').remove(); |
|||
jQuery('.oe_blockui_spin_container') |
|||
.empty() |
|||
.html( |
|||
_.string.sprintf( |
|||
openerp.web._t( |
|||
'<p style="background: white">You have been logged out successfully. <a href="#">Click here to log in again.</a></p>') |
|||
)) |
|||
.click(function() |
|||
{ |
|||
window.location.reload(); |
|||
}); |
|||
}); |
|||
return deferred; |
|||
} |
|||
}); |
|||
} |
Write
Preview
Loading…
Cancel
Save
Reference in new issue