diff --git a/muk_web_theme/__manifest__.py b/muk_web_theme/__manifest__.py index bd1ee42..9dbaa3f 100644 --- a/muk_web_theme/__manifest__.py +++ b/muk_web_theme/__manifest__.py @@ -19,7 +19,7 @@ { "name": "MuK Backend Theme", "summary": "Odoo Community Backend Theme", - "version": "12.0.1.5.7", + "version": "12.0.1.5.9", "category": "Themes/Backend", "license": "AGPL-3", "author": "MuK IT", diff --git a/muk_web_theme/static/description/branding_mail_banner.png b/muk_web_theme/static/description/branding_mail_banner.png new file mode 100644 index 0000000..2e6859f Binary files /dev/null and b/muk_web_theme/static/description/branding_mail_banner.png differ diff --git a/muk_web_theme/static/description/branding_saas_banner.png b/muk_web_theme/static/description/branding_saas_banner.png new file mode 100644 index 0000000..e1a7a34 Binary files /dev/null and b/muk_web_theme/static/description/branding_saas_banner.png differ diff --git a/muk_web_theme/static/description/branding_website_banner.png b/muk_web_theme/static/description/branding_website_banner.png new file mode 100644 index 0000000..8400152 Binary files /dev/null and b/muk_web_theme/static/description/branding_website_banner.png differ diff --git a/muk_web_theme/static/description/index.html b/muk_web_theme/static/description/index.html index 66f0805..0dc1b6c 100644 --- a/muk_web_theme/static/description/index.html +++ b/muk_web_theme/static/description/index.html @@ -97,19 +97,87 @@
diff --git a/muk_web_theme/static/description/screenshot_more.png b/muk_web_theme/static/description/screenshot_more.png deleted file mode 100644 index a8d4bc1..0000000 Binary files a/muk_web_theme/static/description/screenshot_more.png and /dev/null differ diff --git a/muk_web_theme/static/description/screenshot_search.png b/muk_web_theme/static/description/screenshot_search.png deleted file mode 100644 index 3bf9142..0000000 Binary files a/muk_web_theme/static/description/screenshot_search.png and /dev/null differ diff --git a/muk_web_theme/static/description/theme_branding_banner.png b/muk_web_theme/static/description/theme_branding_banner.png new file mode 100644 index 0000000..38bf23b Binary files /dev/null and b/muk_web_theme/static/description/theme_branding_banner.png differ diff --git a/muk_web_theme/static/description/theme_mail_banner.png b/muk_web_theme/static/description/theme_mail_banner.png new file mode 100644 index 0000000..789716e Binary files /dev/null and b/muk_web_theme/static/description/theme_mail_banner.png differ diff --git a/muk_web_theme/static/description/theme_website_banner.png b/muk_web_theme/static/description/theme_website_banner.png new file mode 100644 index 0000000..c26919f Binary files /dev/null and b/muk_web_theme/static/description/theme_website_banner.png differ diff --git a/muk_web_theme/static/src/js/views/list_renderer.js b/muk_web_theme/static/src/js/views/list_renderer.js new file mode 100644 index 0000000..1a413ee --- /dev/null +++ b/muk_web_theme/static/src/js/views/list_renderer.js @@ -0,0 +1,104 @@ +/********************************************************************************** +* +* 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 . +* +**********************************************************************************/ + +odoo.define('muk_web_theme.ListRenderer', function (require) { +"use strict"; + +var dom = require('web.dom'); +var core = require('web.core'); +var config = require("web.config"); + +var ListRenderer = require('web.ListRenderer'); + +var _t = core._t; +var QWeb = core.qweb; + +ListRenderer.include({ + _range_history: [], + _render: function() { + var res = this._super.apply(this, arguments); + this.$table = this.$el.find('.o_list_view'); + return res; + }, + _getRangeSelection: function() { + var self = this; + var start = null, end = null; + this.$el.find('td.o_list_record_selector input').each(function (i, el) { + var id = $(el).closest('tr').data('id'); + var checked = self._range_history.indexOf(id) !== -1; + if (checked && $(el).is(':checked')) { + if (start == null) { + start = i; + } else { + end = i; + } + } + }); + var new_range = this._getSelectionByRange(start, end); + var current_selection = this.selection; + current_selection = _.uniq(current_selection.concat(new_range)); + return current_selection; + }, + _getSelectionByRange: function(start, end) { + var result = []; + this.$el.find('td.o_list_record_selector input').closest('tr').each(function (i, el) { + var record_id = $(el).data('id'); + if (start != null && end != null && i >= start && i <= end) { + result.push(record_id); + } else if(start != null && end == null && start == i) { + result.push(record_id); + } + }); + return result; + }, + _pushRangeHistory: function(id) { + if (this._range_history.length === 2) { + this._range_history = []; + } + this._range_history.push(id); + }, + _deselectTable: function() { + window.getSelection().removeAllRanges(); + }, + _onSelectRecord: function(event) { + var res = this._super.apply(this, arguments); + var element = $(event.currentTarget); + if (/firefox/i.test(navigator.userAgent) && event.shiftKey) { + element.find('input').prop('checked', !element.find('input').prop('checked')); + } + if (element.find('input').prop('checked')) { + this._pushRangeHistory(element.closest('tr').data('id')); + } + if (event.shiftKey) { + var selection = this._getRangeSelection(); + var $rows = this.$el.find('td.o_list_record_selector input').closest('tr'); + $rows.each(function () { + var record_id = $(this).data('id'); + if (selection.indexOf(record_id) !== -1) { + $(this).find('td.o_list_record_selector input').prop('checked', true); + } + }); + this._updateSelection(); + this._deselectTable(); + } + return res; + } +}); + +}); \ No newline at end of file diff --git a/muk_web_theme/template/assets.xml b/muk_web_theme/template/assets.xml index 3121c19..5ddacb3 100644 --- a/muk_web_theme/template/assets.xml +++ b/muk_web_theme/template/assets.xml @@ -65,6 +65,7 @@