mirror of
https://github.com/OCA/web.git
synced 2025-02-22 13:21:25 +02:00
[MIG] 10.0 web_fullscreen
This commit is contained in:
3
web_fullscreen/static/src/css/web_fullscreen.css
Normal file
3
web_fullscreen/static/src/css/web_fullscreen.css
Normal file
@@ -0,0 +1,3 @@
|
||||
.o_control_panel .o_cp_fullscreen {
|
||||
padding-left: 5px;
|
||||
}
|
||||
BIN
web_fullscreen/static/src/img/web_fullscreen.gif
Normal file
BIN
web_fullscreen/static/src/img/web_fullscreen.gif
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 732 KiB |
@@ -1,27 +1,17 @@
|
||||
openerp.web_fullscreen = function(instance, local) {
|
||||
var _t = instance.web._t,
|
||||
_lt = instance.web._lt;
|
||||
var QWeb = instance.web.qweb;
|
||||
|
||||
local.FullscreenButton = instance.Widget.extend({
|
||||
template: 'FullscreenButton',
|
||||
events: {
|
||||
"click a": "toggle"
|
||||
},
|
||||
toggle: function() {
|
||||
$("#oe_main_menu_navbar").toggle();
|
||||
$(".oe_leftbar").toggle();
|
||||
},
|
||||
start: function() {
|
||||
this.$el.find('a').tooltip();
|
||||
}
|
||||
});
|
||||
|
||||
instance.web.ViewManager.include({
|
||||
start: function() {
|
||||
odoo.define('web.fullscreen', function (require) {
|
||||
"use strict";
|
||||
|
||||
var ControlPanel = require('web.ControlPanel');
|
||||
|
||||
ControlPanel.include({
|
||||
start: function () {
|
||||
this._super.apply(this, arguments);
|
||||
var btn = new local.FullscreenButton(this);
|
||||
return btn.appendTo(this.$el.find('.oe_view_manager_switch'));
|
||||
}
|
||||
this.$el.on('click', '.o_cp_fullscreen', function () {
|
||||
$("#oe_main_menu_navbar").toggle();
|
||||
$(".o_sub_menu").toggle();
|
||||
});
|
||||
},
|
||||
});
|
||||
}
|
||||
/* eslint require-jsdoc: 0*/
|
||||
});
|
||||
|
||||
|
||||
15
web_fullscreen/static/src/xml/web_fullscreen_templates.xml
Normal file
15
web_fullscreen/static/src/xml/web_fullscreen_templates.xml
Normal file
@@ -0,0 +1,15 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<templates xml:space="preserve">
|
||||
<t t-extend="ControlPanel">
|
||||
<t t-jquery=".o_cp_switch_buttons" t-operation="after">
|
||||
<div class="btn-group btn-group-sm o_cp_fullscreen">
|
||||
<button class="btn btn-icon fa fa-lg fa-tablet"
|
||||
data-toggle="tooltip" data-placement="top"
|
||||
aria-expanded="false" href="#">
|
||||
<i title="Fullscreen Mode"
|
||||
aria-hidden="true"/>
|
||||
</button>
|
||||
</div>
|
||||
</t>
|
||||
</t>
|
||||
</templates>
|
||||
Reference in New Issue
Block a user