Browse Source

publish muk_web_theme - 12.0

pull/115/head
MuK IT GmbH 5 years ago
parent
commit
e9b7102033
  1. 2
      muk_web_theme/__manifest__.py
  2. 65
      muk_web_theme/static/src/js/fields/relational.js
  3. 24
      muk_web_theme/static/src/js/views/form_view.js
  4. 7
      muk_web_theme/static/src/scss/fields.scss
  5. 6
      muk_web_theme/static/src/scss/form_view.scss
  6. 3
      muk_web_theme/template/assets.xml

2
muk_web_theme/__manifest__.py

@ -19,7 +19,7 @@
{ {
"name": "MuK Backend Theme", "name": "MuK Backend Theme",
"summary": "Odoo Community Backend Theme", "summary": "Odoo Community Backend Theme",
"version": "12.0.1.6.6",
"version": "12.0.1.6.8",
"category": "Themes/Backend", "category": "Themes/Backend",
"license": "AGPL-3", "license": "AGPL-3",
"author": "MuK IT", "author": "MuK IT",

65
muk_web_theme/static/src/js/fields/relational.js

@ -0,0 +1,65 @@
/**********************************************************************************
*
* Copyright (C) 2017 MuK IT GmbH
*
* 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/>.
*
**********************************************************************************/
odoo.define('muk_web_theme.RelationalFields', function (require) {
"use strict";
var core = require('web.core');
var config = require("web.config");
var fields = require('web.relational_fields');
var _t = core._t;
var QWeb = core.qweb;
fields.FieldStatus.include({
_setState: function () {
this._super.apply(this, arguments);
if (config.device.isMobile) {
_.map(this.status_information, function (value) {
value.fold = true;
});
}
},
});
fields.FieldOne2Many.include({
_renderButtons: function () {
var result = this._super.apply(this, arguments);
if (config.device.isMobile && this.$buttons) {
var $buttons = this.$buttons.find('.btn-secondary');
$buttons.addClass('btn-primary mk_mobile_add');
$buttons.removeClass('btn-secondary');
}
return result;
}
});
fields.FieldMany2Many.include({
_renderButtons: function () {
var result = this._super.apply(this, arguments);
if (config.device.isMobile && this.$buttons) {
var $buttons = this.$buttons.find('.btn-secondary');
$buttons.addClass('btn-primary mk_mobile_add');
$buttons.removeClass('btn-secondary');
}
return result;
}
});
});

24
muk_web_theme/static/src/js/fields/status.js → muk_web_theme/static/src/js/views/form_view.js

@ -17,23 +17,33 @@
* *
**********************************************************************************/ **********************************************************************************/
odoo.define('muk_web_theme.FieldStatus', function (require) {
odoo.define('muk_web_theme.FormView', function (require) {
"use strict"; "use strict";
var dom = require('web.dom');
var core = require('web.core'); var core = require('web.core');
var config = require("web.config"); var config = require("web.config");
var fields = require('web.relational_fields');
var FormView = require('web.FormView');
var QuickCreateFormView = require('web.QuickCreateFormView');
var _t = core._t; var _t = core._t;
var QWeb = core.qweb; var QWeb = core.qweb;
fields.FieldStatus.include({
_setState: function () {
FormView.include({
init: function () {
this._super.apply(this, arguments);
if (config.device.isMobile) {
this.controllerParams.disableAutofocus = true;
}
},
});
QuickCreateFormView.include({
init: function () {
this._super.apply(this, arguments); this._super.apply(this, arguments);
if (config.device.isMobile) { if (config.device.isMobile) {
_.map(this.status_information, function (value) {
value.fold = true;
});
this.controllerParams.disableAutofocus = true;
} }
}, },
}); });

7
muk_web_theme/static/src/scss/fields.scss

@ -28,3 +28,10 @@
background-color: $mk-required-color !important; background-color: $mk-required-color !important;
} }
} }
@include media-breakpoint-down(sm) {
.o_form_view .mk_mobile_add {
margin-left: 0 !important;
margin-bottom: 10px !important;
}
}

6
muk_web_theme/static/src/scss/form_view.scss

@ -121,6 +121,12 @@
display: none; display: none;
} }
} }
.o_cp_buttons {
width: 100%;
div, .o-kanban-button-new {
width: 100%;
}
}
} }
@include media-breakpoint-down(xs) { @include media-breakpoint-down(xs) {
.oe_button_box { .oe_button_box {

3
muk_web_theme/template/assets.xml

@ -66,8 +66,9 @@
<script type="text/javascript" src="/muk_web_theme/static/src/js/chrome/appsbar.js" /> <script type="text/javascript" src="/muk_web_theme/static/src/js/chrome/appsbar.js" />
<script type="text/javascript" src="/muk_web_theme/static/src/js/chrome/sidebar.js" /> <script type="text/javascript" src="/muk_web_theme/static/src/js/chrome/sidebar.js" />
<script type="text/javascript" src="/muk_web_theme/static/src/js/chrome/pager.js" /> <script type="text/javascript" src="/muk_web_theme/static/src/js/chrome/pager.js" />
<script type="text/javascript" src="/muk_web_theme/static/src/js/fields/status.js" />
<script type="text/javascript" src="/muk_web_theme/static/src/js/fields/relational.js" />
<script type="text/javascript" src="/muk_web_theme/static/src/js/views/search_view.js" /> <script type="text/javascript" src="/muk_web_theme/static/src/js/views/search_view.js" />
<script type="text/javascript" src="/muk_web_theme/static/src/js/views/form_view.js" />
<script type="text/javascript" src="/muk_web_theme/static/src/js/views/form_renderer.js" /> <script type="text/javascript" src="/muk_web_theme/static/src/js/views/form_renderer.js" />
<script type="text/javascript" src="/muk_web_theme/static/src/js/views/list_renderer.js" /> <script type="text/javascript" src="/muk_web_theme/static/src/js/views/list_renderer.js" />
</xpath> </xpath>

Loading…
Cancel
Save