Browse Source

Merge PR #1311 into 12.0

Signed-off-by pedrobaeza
pull/1324/head
OCA-git-bot 6 years ago
parent
commit
99450497ed
  1. 1
      web_responsive/README.rst
  2. 2
      web_responsive/__manifest__.py
  3. 1
      web_responsive/readme/CONTRIBUTORS.rst
  4. 1
      web_responsive/static/description/index.html
  5. 27
      web_responsive/static/src/js/web_responsive.js

1
web_responsive/README.rst

@ -156,6 +156,7 @@ Contributors
* Dennis Sluijk <d.sluijk@onestein.nl>
* Sergio Teruel <sergio.teruel@tecnativa.com>
* Alexandre Díaz <dev@redneboa.es>
* Mathias Markl <mathias.markl@mukit.at>
Maintainers
~~~~~~~~~~~

2
web_responsive/__manifest__.py

@ -5,7 +5,7 @@
{
"name": "Web Responsive",
"summary": "Responsive web client, community-supported",
"version": "12.0.1.1.1",
"version": "12.0.1.1.2",
"category": "Website",
"website": "https://github.com/OCA/web",
"author": "LasLabs, Tecnativa, Alexandre Díaz, "

1
web_responsive/readme/CONTRIBUTORS.rst

@ -3,3 +3,4 @@
* Dennis Sluijk <d.sluijk@onestein.nl>
* Sergio Teruel <sergio.teruel@tecnativa.com>
* Alexandre Díaz <dev@redneboa.es>
* Mathias Markl <mathias.markl@mukit.at>

1
web_responsive/static/description/index.html

@ -492,6 +492,7 @@ If you spotted it first, help us smashing it by providing a detailed and welcome
<li>Dennis Sluijk &lt;<a class="reference external" href="mailto:d.sluijk&#64;onestein.nl">d.sluijk&#64;onestein.nl</a>&gt;</li>
<li>Sergio Teruel &lt;<a class="reference external" href="mailto:sergio.teruel&#64;tecnativa.com">sergio.teruel&#64;tecnativa.com</a>&gt;</li>
<li>Alexandre Díaz &lt;<a class="reference external" href="mailto:dev&#64;redneboa.es">dev&#64;redneboa.es</a>&gt;</li>
<li>Mathias Markl &lt;<a class="reference external" href="mailto:mathias.markl&#64;mukit.at">mathias.markl&#64;mukit.at</a>&gt;</li>
</ul>
</div>
<div class="section" id="maintainers">

27
web_responsive/static/src/js/web_responsive.js

@ -7,6 +7,7 @@ odoo.define('web_responsive', function (require) {
var ActionManager = require('web.ActionManager');
var AbstractWebClient = require("web.AbstractWebClient");
var AppsMenu = require("web.AppsMenu");
var BasicController = require('web.BasicController');
var config = require("web.config");
var core = require("web.core");
var FormRenderer = require('web.FormRenderer');
@ -112,6 +113,16 @@ odoo.define('web_responsive', function (require) {
return this._super.apply(this, arguments);
},
/**
* Prevent the menu from being opened twice
*
* @override
*/
_onAppsMenuItemClicked: function (ev) {
this._super.apply(this, arguments);
ev.preventDefault();
},
/**
* Get all info for a given menu.
*
@ -276,6 +287,22 @@ odoo.define('web_responsive', function (require) {
},
});
BasicController.include({
/**
* Close the AppDrawer if the data set is dirty and a discard dialog is opened
*
* @override
*/
canBeDiscarded: function (recordID) {
if (this.model.isDirty(recordID || this.handle)) {
$('.o_menu_apps .dropdown:has(.dropdown-menu.show) > a').dropdown('toggle');
$('.o_menu_sections li.show .dropdown-toggle').dropdown('toggle');
}
return this._super.apply(this, arguments);
},
});
Menu.include({
events: _.extend({
// Clicking a hamburger menu item should close the hamburger

Loading…
Cancel
Save