Backend Theme

- New Backend design
- More user friendly
- Less Branding
- Fresh New Color Palette
- Fresh New Fonts
This commit is contained in:
Chintan Ambaliya 2018-01-17 15:04:06 +05:30 committed by chintan-ambaliya
parent 037e8fd3c8
commit d1e6c1652c
54 changed files with 2861 additions and 45 deletions

View File

@ -25,6 +25,8 @@ This module provides the core of the Odoo Web Client.
"static/src/xml/rainbow_man.xml",
"static/src/xml/report.xml",
"static/src/xml/web_calendar.xml",
"static/src/xml/backend_theme.xml",
"static/src/xml/backend_theme_customizer.xml",
],
'bootstrap': True, # load translations for login screen
}

View File

@ -450,6 +450,9 @@ class Home(http.Controller):
request.uid = request.session.uid
try:
context = request.env['ir.http'].webclient_rendering_context()
res_company = request.env['res.company'].sudo().search(
[('id', '=', json.loads(context['session_info'])['company_id'])])
context.update({'company_name': res_company.name})
response = request.render('web.webclient_bootstrap', qcontext=context)
response.headers['X-Frame-Options'] = 'DENY'
return response
@ -502,6 +505,49 @@ class Home(http.Controller):
response.headers['X-Frame-Options'] = 'DENY'
return response
def get_view_ids(self, xml_ids):
ids = []
for xml_id in xml_ids:
if "." in xml_id:
record_id = request.env.ref(xml_id).id
else:
record_id = int(xml_id)
ids.append(record_id)
return ids
@http.route(['/web/theme_customize_backend_get'], type='json', website=True, auth="public")
def theme_customize_backend_get(self, xml_ids):
enable = []
disable = []
ids = self.get_view_ids(xml_ids)
for view in request.env['ir.ui.view'].with_context(
active_test=True).browse(ids):
if view.active:
enable.append(view.xml_id)
else:
disable.append(view.xml_id)
return [enable, disable]
@http.route(['/web/theme_customize_backend'], type='json', website=True, auth="public")
def theme_customize_backend(self, enable, disable, get_bundle=False):
""" enable or Disable lists of ``xml_id`` of the inherit templates """
def set_active(ids, active):
if ids:
real_ids = self.get_view_ids(ids)
request.env['ir.ui.view'].with_context(
active_test=True).browse(real_ids).write(
{'active': active})
set_active(disable, False)
set_active(enable, True)
if get_bundle:
context = dict(request.context, active_test=True)
return request.env["ir.qweb"]._get_asset('web.assets_backend',
options=context)
return True
class WebClient(http.Controller):

View File

@ -0,0 +1,238 @@
!function ($) {
"use strict";
// TABCOLLAPSE CLASS DEFINITION
// Ref Link : https://gist.github.com/timramseyjr/b6a898ec03f217ebe09d897c185a0311
// ======================
var TabCollapse = function (el, options) {
this.options = options;
this.$tabs = $(el);
this._accordionVisible = false; //content is attached to tabs at first
this._initAccordion();
this._checkStateOnResize();
// checkState() has gone to setTimeout for making it possible to attach listeners to
// shown-accordion.bs.tabcollapse event on page load.
// See https://github.com/flatlogic/bootstrap-tabcollapse/issues/23
var that = this;
setTimeout(function () {
that.checkState();
}, 0);
};
TabCollapse.DEFAULTS = {
accordionClass: 'visible-xs',
tabsClass: 'hidden-xs',
accordionTemplate: function (heading, groupId, parentId, active) {
return '<div class="panel panel-default">' +
' <div class="panel-heading">' +
' <h4 class="panel-title">' +
' </h4>' +
' </div>' +
' <div id="' + groupId + '" class="panel-collapse collapse ' + (active ? 'in' : '') + '">' +
' <div class="panel-body js-tabcollapse-panel-body">' +
' </div>' +
' </div>' +
'</div>'
}
};
TabCollapse.prototype.checkState = function () {
if (this.$tabs.is(':visible') && this._accordionVisible) {
this.showTabs();
this._accordionVisible = false;
} else if (this.$accordion.is(':visible') && !this._accordionVisible) {
this.showAccordion();
this._accordionVisible = true;
}
};
TabCollapse.prototype.showTabs = function () {
var view = this;
this.$tabs.trigger($.Event('show-tabs.bs.tabcollapse'));
var $panelHeadings = this.$accordion.find('.js-tabcollapse-panel-heading').detach();
$panelHeadings.each(function () {
var $panelHeading = $(this),
$parentLi = $panelHeading.data('bs.tabcollapse.parentLi');
var $oldHeading = view._panelHeadingToTabHeading($panelHeading);
$parentLi.removeClass('active');
if ($parentLi.parent().hasClass('dropdown-menu') && !$parentLi.siblings('li').hasClass('active')) {
$parentLi.parent().parent().removeClass('active');
}
if (!$oldHeading.hasClass('collapsed')) {
$parentLi.addClass('active');
if ($parentLi.parent().hasClass('dropdown-menu')) {
$parentLi.parent().parent().addClass('active');
}
} else {
$oldHeading.removeClass('collapsed');
}
$parentLi.append($panelHeading);
});
if (!$('li').hasClass('active')) {
$('li').first().addClass('active')
}
var $panelBodies = this.$accordion.find('.js-tabcollapse-panel-body');
$panelBodies.each(function () {
var $panelBody = $(this),
$tabPane = $panelBody.data('bs.tabcollapse.tabpane');
$tabPane.append($panelBody.contents().detach());
});
this.$accordion.html('');
if (this.options.updateLinks) {
var $tabContents = this.getTabContentElement();
$tabContents.find('[data-toggle-was="tab"], [data-toggle-was="pill"]').each(function () {
var $el = $(this);
var href = $el.attr('href').replace(/-collapse$/g, '');
$el.attr({
'data-toggle': $el.attr('data-toggle-was'),
'data-toggle-was': '',
'data-parent': '',
href: href
});
});
}
this.$tabs.trigger($.Event('shown-tabs.bs.tabcollapse'));
};
TabCollapse.prototype.getTabContentElement = function () {
var $tabContents = $(this.options.tabContentSelector);
if ($tabContents.length === 0) {
$tabContents = this.$tabs.siblings('.tab-content');
}
return $tabContents;
};
TabCollapse.prototype.showAccordion = function () {
this.$tabs.trigger($.Event('show-accordion.bs.tabcollapse'));
var $headings = this.$tabs.find('li:not(.dropdown) [data-toggle="tab"], li:not(.dropdown) [data-toggle="pill"]'),
view = this;
$headings.each(function () {
var $heading = $(this),
$parentLi = $heading.parent();
if (("" + $parentLi.attr('class')).toString().indexOf('o_invisible_modifier') !== -1) {
return;
}
$heading.data('bs.tabcollapse.parentLi', $parentLi);
view.$accordion.append(view._createAccordionGroup(view.$accordion.attr('id'), $heading.detach()));
});
if (this.options.updateLinks) {
var parentId = this.$accordion.attr('id');
var $selector = this.$accordion.find('.js-tabcollapse-panel-body');
$selector.find('[data-toggle="tab"], [data-toggle="pill"]').each(function () {
var $el = $(this);
var href = $el.attr('href') + '-collapse';
$el.attr({
'data-toggle-was': $el.attr('data-toggle'),
'data-toggle': 'collapse',
'data-parent': '#' + parentId,
href: href
});
});
}
this.$tabs.trigger($.Event('shown-accordion.bs.tabcollapse'));
};
TabCollapse.prototype._panelHeadingToTabHeading = function ($heading) {
var href = $heading.attr('href').replace(/-collapse$/g, '');
$heading.attr({
'data-toggle': 'tab',
'href': href,
'data-parent': ''
});
return $heading;
};
TabCollapse.prototype._tabHeadingToPanelHeading = function ($heading, groupId, parentId, active) {
$heading.addClass('js-tabcollapse-panel-heading ' + (active ? '' : 'collapsed'));
$heading.attr({
'data-toggle': 'collapse',
'data-parent': '#' + parentId,
'href': '#' + groupId
});
return $heading;
};
TabCollapse.prototype._checkStateOnResize = function () {
var view = this;
$(window).resize(function () {
clearTimeout(view._resizeTimeout);
view._resizeTimeout = setTimeout(function () {
view.checkState();
}, 100);
});
};
TabCollapse.prototype._initAccordion = function () {
var randomString = function () {
var result = "",
possible = "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789";
for (var i = 0; i < 5; i++) {
result += possible.charAt(Math.floor(Math.random() * possible.length));
}
return result;
};
var srcId = this.$tabs.attr('id'),
accordionId = (srcId ? srcId : randomString()) + '-accordion';
this.$accordion = $('<div class="panel-group ' + this.options.accordionClass + '" id="' + accordionId + '"></div>');
this.$tabs.after(this.$accordion);
this.$tabs.addClass(this.options.tabsClass);
this.getTabContentElement().addClass(this.options.tabsClass);
};
TabCollapse.prototype._createAccordionGroup = function (parentId, $heading) {
var tabSelector = $heading.attr('data-target'),
active = $heading.data('bs.tabcollapse.parentLi').is('.active');
if (!tabSelector) {
tabSelector = $heading.attr('href');
tabSelector = tabSelector && tabSelector.replace(/.*(?=#[^\s]*$)/, ''); //strip for ie7
}
var $tabPane = $(tabSelector),
groupId = $tabPane.attr('id') + '-collapse',
$panel = $(this.options.accordionTemplate($heading, groupId, parentId, active));
$panel.find('.panel-heading > .panel-title').append(this._tabHeadingToPanelHeading($heading, groupId, parentId, active));
$panel.find('.panel-body').append($tabPane.contents().detach())
.data('bs.tabcollapse.tabpane', $tabPane);
return $panel;
};
// TABCOLLAPSE PLUGIN DEFINITION
// =======================
$.fn.tabCollapse = function (option) {
return this.each(function () {
var $this = $(this);
var data = $this.data('bs.tabcollapse');
var options = $.extend({}, TabCollapse.DEFAULTS, $this.data(), typeof option === 'object' && option);
if (!data) $this.data('bs.tabcollapse', new TabCollapse(this, options));
});
};
$.fn.tabCollapse.Constructor = TabCollapse;
}(window.jQuery);
//$('ul.nav-tabs').tabCollapse();

Binary file not shown.

Binary file not shown.

View File

@ -0,0 +1,14 @@
<?xml version="1.0" encoding="utf-8"?>
<!-- Generator: Adobe Illustrator 16.0.0, SVG Export Plug-In . SVG Version: 6.00 Build 0) -->
<!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN" "http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd">
<svg version="1.1" id="Layer_1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" x="0px" y="0px"
width="15px" height="15px" viewBox="0 0 15 15" enable-background="new 0 0 15 15" xml:space="preserve">
<g>
<path fill="#ffffff" d="M12.385,5.578L7.65,10.313l-0.89,0.888c-0.119,0.119-0.281,0.184-0.444,0.184
c-0.162,0-0.328-0.064-0.445-0.184l-0.89-0.888L2.615,7.944C2.497,7.828,2.432,7.664,2.432,7.5c0-0.163,0.065-0.325,0.183-0.444
l0.89-0.89c0.118-0.117,0.281-0.183,0.444-0.183c0.164,0,0.327,0.065,0.445,0.183l1.923,1.929l4.289-4.296
c0.119-0.118,0.282-0.183,0.445-0.183c0.164,0,0.327,0.065,0.445,0.183l0.889,0.89c0.118,0.118,0.184,0.281,0.184,0.445
C12.568,5.296,12.503,5.46,12.385,5.578z"/>
</g>
</svg>

After

Width:  |  Height:  |  Size: 975 B

View File

@ -0,0 +1,21 @@
<?xml version="1.0" encoding="utf-8"?>
<svg width='100px' height='100px' xmlns="http://www.w3.org/2000/svg"
viewBox="0 0 100 100" preserveAspectRatio="xMidYMid" class="uil-gears">
<rect x="0" y="0" width="100" height="100" fill="none" class="bk"></rect>
<g transform="translate(-20,-20)">
<path d="M79.9,52.6C80,51.8,80,50.9,80,50s0-1.8-0.1-2.6l-5.1-0.4c-0.3-2.4-0.9-4.6-1.8-6.7l4.2-2.9c-0.7-1.6-1.6-3.1-2.6-4.5 L70,35c-1.4-1.9-3.1-3.5-4.9-4.9l2.2-4.6c-1.4-1-2.9-1.9-4.5-2.6L59.8,27c-2.1-0.9-4.4-1.5-6.7-1.8l-0.4-5.1C51.8,20,50.9,20,50,20 s-1.8,0-2.6,0.1l-0.4,5.1c-2.4,0.3-4.6,0.9-6.7,1.8l-2.9-4.1c-1.6,0.7-3.1,1.6-4.5,2.6l2.1,4.6c-1.9,1.4-3.5,3.1-5,4.9l-4.5-2.1 c-1,1.4-1.9,2.9-2.6,4.5l4.1,2.9c-0.9,2.1-1.5,4.4-1.8,6.8l-5,0.4C20,48.2,20,49.1,20,50s0,1.8,0.1,2.6l5,0.4 c0.3,2.4,0.9,4.7,1.8,6.8l-4.1,2.9c0.7,1.6,1.6,3.1,2.6,4.5l4.5-2.1c1.4,1.9,3.1,3.5,5,4.9l-2.1,4.6c1.4,1,2.9,1.9,4.5,2.6l2.9-4.1 c2.1,0.9,4.4,1.5,6.7,1.8l0.4,5.1C48.2,80,49.1,80,50,80s1.8,0,2.6-0.1l0.4-5.1c2.3-0.3,4.6-0.9,6.7-1.8l2.9,4.2 c1.6-0.7,3.1-1.6,4.5-2.6L65,69.9c1.9-1.4,3.5-3,4.9-4.9l4.6,2.2c1-1.4,1.9-2.9,2.6-4.5L73,59.8c0.9-2.1,1.5-4.4,1.8-6.7L79.9,52.6 z M50,65c-8.3,0-15-6.7-15-15c0-8.3,6.7-15,15-15s15,6.7,15,15C65,58.3,58.3,65,50,65z"
fill="#fff">
<animateTransform attributeName="transform" type="rotate"
from="90 50 50" to="0 50 50" dur="1s"
repeatCount="indefinite"></animateTransform>
</path>
</g>
<g transform="translate(20,20) rotate(15 50 50)">
<path d="M79.9,52.6C80,51.8,80,50.9,80,50s0-1.8-0.1-2.6l-5.1-0.4c-0.3-2.4-0.9-4.6-1.8-6.7l4.2-2.9c-0.7-1.6-1.6-3.1-2.6-4.5 L70,35c-1.4-1.9-3.1-3.5-4.9-4.9l2.2-4.6c-1.4-1-2.9-1.9-4.5-2.6L59.8,27c-2.1-0.9-4.4-1.5-6.7-1.8l-0.4-5.1C51.8,20,50.9,20,50,20 s-1.8,0-2.6,0.1l-0.4,5.1c-2.4,0.3-4.6,0.9-6.7,1.8l-2.9-4.1c-1.6,0.7-3.1,1.6-4.5,2.6l2.1,4.6c-1.9,1.4-3.5,3.1-5,4.9l-4.5-2.1 c-1,1.4-1.9,2.9-2.6,4.5l4.1,2.9c-0.9,2.1-1.5,4.4-1.8,6.8l-5,0.4C20,48.2,20,49.1,20,50s0,1.8,0.1,2.6l5,0.4 c0.3,2.4,0.9,4.7,1.8,6.8l-4.1,2.9c0.7,1.6,1.6,3.1,2.6,4.5l4.5-2.1c1.4,1.9,3.1,3.5,5,4.9l-2.1,4.6c1.4,1,2.9,1.9,4.5,2.6l2.9-4.1 c2.1,0.9,4.4,1.5,6.7,1.8l0.4,5.1C48.2,80,49.1,80,50,80s1.8,0,2.6-0.1l0.4-5.1c2.3-0.3,4.6-0.9,6.7-1.8l2.9,4.2 c1.6-0.7,3.1-1.6,4.5-2.6L65,69.9c1.9-1.4,3.5-3,4.9-4.9l4.6,2.2c1-1.4,1.9-2.9,2.6-4.5L73,59.8c0.9-2.1,1.5-4.4,1.8-6.7L79.9,52.6 z M50,65c-8.3,0-15-6.7-15-15c0-8.3,6.7-15,15-15s15,6.7,15,15C65,58.3,58.3,65,50,65z"
fill="#fff">
<animateTransform attributeName="transform" type="rotate"
from="0 50 50" to="90 50 50" dur="1s"
repeatCount="indefinite"></animateTransform>
</path>
</g>
</svg>

After

Width:  |  Height:  |  Size: 2.7 KiB

View File

@ -0,0 +1,27 @@
flectra.define('web.BackendThemeCustomizer', function (require) {
"use strict";
var SystrayMenu = require('web.SystrayMenu');
var Widget = require('web.Widget');
var Theme = require('web.CustomizeSwitcher');
var session = require('web.session');
/**
* Menu item appended in the systray part of the navbar, redirects to the Inbox in Discuss
* Also displays the needaction counter (= Inbox counter)
*/
var CustomizeMenu = Widget.extend({
template: 'web.customize_menu',
start: function () {
this._super.apply(this, arguments);
this.theme = new Theme();
this.theme.appendTo("#theme_customize_backend ul");
},
});
if (session.is_superuser) {
SystrayMenu.Items.push(CustomizeMenu);
}
});

View File

@ -0,0 +1,81 @@
flectra.define('web.CustomizeSwitcher', function (require) {
"use strict";
var core = require('web.core');
var Widget = require('web.Widget');
var ajax = require('web.ajax');
var QWeb = core.qweb;
var Theme = Widget.extend({
template: 'web.theme_customize_backend',
events: {
'change input[data-xmlid]': 'change_selection',
'click .theme_customizer_close': 'close',
},
start: function () {
this.$inputs = this.$("input[data-xmlid]");
this.loader = QWeb.render('web.color_palette_loading');
return this.load_xml_data();
},
load_xml_data: function () {
var self = this;
return ajax.jsonRpc('/web/theme_customize_backend_get', 'call', {
'xml_ids': this.get_xml_ids(this.$inputs)
}).done(function (data) {
_.each(data[0], function (active_less_id) {
self.$inputs.filter('[data-xmlid="' + active_less_id + '"]').prop("checked", true);
});
}).fail(function (d, error) {
$('body').prepend($('<div id="theme_error"/>').text(error.data.message));
console.log(error.data.message);
});
},
get_xml_ids: function ($inputs) {
var xml_ids = [];
$inputs.each(function () {
if ($(this).data('xmlid') && $(this).data('xmlid').length) {
xml_ids.push($(this).data('xmlid').trim());
}
});
return xml_ids;
},
change_selection: function (event) {
var enable = this.get_xml_ids(this.$inputs.filter('[data-xmlid]:checked'));
var disable = this.get_xml_ids(this.$inputs.filter('[data-xmlid]:not(:checked)'));
$('body').append(this.loader);
return ajax.jsonRpc('/web/theme_customize_backend', 'call', {
enable: enable,
disable: disable,
get_bundle: true,
}).then(function (bundleHTML) {
var $links = $('link[href*=".assets_backend"]');
var $newLinks = $(bundleHTML).filter('link');
var linksLoaded = $.Deferred();
var nbLoaded = 0;
$newLinks.on('load', function (e) {
if (++nbLoaded >= $newLinks.length) {
linksLoaded.resolve();
}
});
$newLinks.on('error', function (e) {
linksLoaded.reject();
window.location.hash = "theme=true";
window.location.reload();
});
$links.last().after($newLinks);
return linksLoaded.then(function () {
$links.remove();
$('body').find('.f_color_palette_loading').remove();
});
});
}
});
return Theme;
});

View File

@ -0,0 +1,95 @@
flectra.define('web.AppsLauncher', function (require) {
"use strict";
var core = require('web.core');
var session = require('web.session');
var Widget = require('web.Widget');
var rpc = require('web.rpc');
var QWeb = core.qweb;
var Apps = Widget.extend({
template: 'AppsLauncher',
events: {
'click #f_clear_apps_search': '_clearSearch',
'input .f_apps_search_input': '_appsSearch',
'click a[data-menu]': '_o_app_click',
},
init: function (parent) {
this._super.apply(this, arguments);
this.parent = parent;
},
start: function () {
var self = this;
this._super.apply(this, arguments);
var company = session.company_id;
var img = session.url('/web/binary/company_logo' + '?db=' + session.db + (company ? '&company=' + company : ''));
$(document).keyup(function (e) {
if (e.keyCode == 27) {
$('.o_web_client').removeClass('launcher_opened');
self.$el.parents().find('#f_apps_search').find('i').toggleClass('fa-search fa-times');
}
});
this._createAppDashboardWidget().then(function (apps) {
self.$el.find('.f_apps_content').html(QWeb.render('AppsLauncher.Menus', {
dashboard_apps: apps.children
}));
self.apps = apps.children;
});
this.$('.f_app_footer img').attr('src',img);
},
_getAction: function (menu) {
if (!menu.action && menu.children.length) {
if (menu.children[0].action) {
return menu.children[0].action;
} else {
return this._getAction(menu.children[0]);
}
}
},
_createAppDashboardWidget: function () {
var self = this;
return rpc.query({
model: 'ir.ui.menu',
method: 'load_menus',
args: [core.debug],
kwargs: {context: session.user_context},
}).then(function (menus) {
menus.children = _.each(menus.children, function (menu) {
if (!menu.action && menu.children.length) {
menu.action = self._getAction(menu);
}
return menu;
});
return menus;
});
},
_clearSearch: function (ev) {
this.$el.find('.f_apps_search_input').val('');
this.$el.find('.f_apps_content').html(QWeb.render('AppsLauncher.Menus', {
dashboard_apps: this.apps
}));
},
_appsSearch: function (ev) {
var search_str = $(ev.currentTarget).val().trim().toLowerCase();
var apps = [];
_.each(this.apps, function (app) {
if (app.name.trim().toLowerCase().indexOf(search_str) !== -1) {
apps.push(app);
}
});
this.$el.find('.f_apps_content').html(QWeb.render('AppsLauncher.Menus', {
dashboard_apps: apps
}));
},
_o_app_click: function (ev) {
ev.preventDefault();
this.parent._isMainMenuClick = true;
this.parent.menu_click($(ev.currentTarget).data('menu'));
}
});
return Apps;
});

View File

@ -4,16 +4,22 @@ flectra.define('web.Menu', function (require) {
var core = require('web.core');
var session = require('web.session');
var Widget = require('web.Widget');
var config = require('web.config');
var Apps = require('web.AppsLauncher');
var Menu = Widget.extend({
init: function() {
this._super.apply(this, arguments);
this.is_bound = $.Deferred();
this._isMainMenuClick = false;
this.data = {data:{children:[]}};
this.isLoadflag = true;
core.bus.on('change_menu_section', this, this.on_change_top_menu);
},
start: function() {
this._super.apply(this, arguments);
this.apps = new Apps(this);
this.apps.appendTo(this.$el.parents().find('.o_main'));
return this.bind_menu();
},
do_reload: function() {
@ -22,7 +28,7 @@ var Menu = Widget.extend({
},
bind_menu: function() {
var self = this;
this.$secondary_menus = this.$el.parents().find('.o_sub_menu');
this.$secondary_menus = this.$el.parents().find('.f_launcher');
this.$secondary_menus.on('click', 'a[data-menu]', this.on_menu_click);
this.$el.on('click', 'a[data-menu]', function (event) {
event.preventDefault();
@ -30,6 +36,57 @@ var Menu = Widget.extend({
core.bus.trigger('change_menu_section', menu_id);
});
function toggleIcon(e) {
$(e.target).prev().find('.more-less i').toggleClass('fa-chevron-down fa-chevron-up');
}
this.$secondary_menus.find('[data-toggle="tooltip"]').tooltip({
trigger: "hover",
delay: "500ms"
});
this.$secondary_menus.find('#menu_launcher')
.on('hidden.bs.collapse', toggleIcon)
.on('shown.bs.collapse', toggleIcon);
this.$el.parents().find('li#f_menu_toggle a').click(function (event) {
event.preventDefault();
if (self.is_menus_lite_mode) {
window.sessionStorage.removeItem('menus_lite_mode');
} else {
window.sessionStorage.setItem('menus_lite_mode', true);
}
if (config.device.size_class < config.device.SIZES.SM) {
self.$secondary_menus.toggleClass('f_hide');
} else {
self.$secondary_menus.toggleClass('f_launcher_close');
}
self.is_menus_lite_mode = !self.is_menus_lite_mode;
});
this.$el.parents().find('li#f_apps_search a').click(function (event) {
event.preventDefault();
$(this).find('i').toggleClass('fa-search fa-times');
self.$el.parents().find('.f_search_launcher').toggleClass('launcher_opened');
self.$el.parents().find('.f_search_launcher .f_apps_search_input').focus();
});
this.$el.parents().find('li#f_user_toggle a').click(function (event) {
event.preventDefault();
if (self.$el.parents().find('.user_profile.close_profile').length) {
self.$el.parents().find('.f_launcher_content').animate({
scrollTop: 0
}, 300);
}
self.$el.parents().find('.user_profile').toggleClass('close_profile');
if (self.$el.parents().find('.f_launcher_close').length || self.$el.parents().find('.f_launcher.f_hide').length) {
self.$el.parents().find('.f_launcher').removeClass('f_launcher_close').removeClass('f_hide');
self.$el.parents().find('.user_profile').removeClass('close_profile');
window.sessionStorage.removeItem('menus_lite_mode');
self.is_menus_lite_mode = false;
}
});
// Hide second level submenus
this.$secondary_menus.find('.oe_menu_toggler').siblings('.oe_secondary_submenu').addClass('o_hidden');
if (self.current_menu) {
@ -41,8 +98,15 @@ var Menu = Widget.extend({
core.bus.on('resize', this, function() {
if ($(window).width() < 768 ) {
lazyreflow('all_outside');
self.$secondary_menus.addClass('f_hide').removeClass('f_launcher_close');
self.is_menus_lite_mode = false;
} else {
lazyreflow();
self.$secondary_menus.removeClass('f_hide');
self.is_menus_lite_mode = 'menus_lite_mode' in window.sessionStorage ? true : false;
if (self.is_menus_lite_mode) {
self.$secondary_menus.addClass('f_launcher_close');
}
}
});
core.bus.trigger('resize');
@ -122,9 +186,41 @@ var Menu = Widget.extend({
this.$el.find('.active').removeClass('active');
$main_menu.parent().addClass('active');
// Show current sub menu
this.$secondary_menus.find('.oe_secondary_menu').hide();
$sub_menu.show();
if(this._isMainMenuClick || this.isLoadflag) {
var href_id = $sub_menu.attr('id');
if (href_id && $sub_menu.attr('class').indexOf('in') === -1) {
window.sessionStorage.removeItem('menus_lite_mode');
this.is_menus_lite_mode = false;
if (!this.is_menus_lite_mode) {
this.$secondary_menus.find("a[href='#" + href_id + "']").trigger('click');
}
this.$secondary_menus.find("a[href='#" + href_id + " i']")
.addClass('fa-chevron-up')
.removeClass('fa-chevron-down');
} else {
if (!this.is_menus_lite_mode) {
$clicked_menu.parents('li.panel').find('.oe_main_menu_container .more-less a').trigger('click');
}
this.$secondary_menus.find("a[href='#" + href_id + " i']")
.addClass('fa-chevron-down')
.removeClass('fa-chevron-up');
}
this.$el.parents().find('.f_search_launcher').removeClass('launcher_opened');
this.$el.parents().find('#f_apps_search').find('i').addClass('fa-search').removeClass('fa-times');
}
if (config.device.size_class < config.device.SIZES.SM) {
if(this._isMainMenuClick || !this._isActionId){
this.$secondary_menus.removeClass('f_hide');
}else{
this.$secondary_menus.addClass('f_hide');
}
if(this.isLoadflag){
this.$secondary_menus.addClass('f_hide');
}
} else {
this.$secondary_menus.removeClass('f_hide');
}
// Hide/Show the leftbar menu depending of the presence of sub-items
this.$secondary_menus.toggleClass('o_hidden', !$sub_menu.children().length);
@ -138,11 +234,14 @@ var Menu = Widget.extend({
} else {
$clicked_menu.parent().addClass('active');
}
this.$secondary_menus.find('.oe_main_menu_container').removeClass('active');
$clicked_menu.parents('li.panel').find('.oe_main_menu_container').addClass('active');
}
// add a tooltip to cropped menu items
this.$secondary_menus.find('.oe_secondary_submenu li a span').each(function() {
$(this).tooltip(this.scrollWidth > this.clientWidth ? {title: $(this).text().trim(), placement: 'right'} :'destroy');
});
});
this.isLoadflag = false;
},
/**
* Call open_menu with the first menu_item matching an action_id
@ -190,6 +289,7 @@ var Menu = Widget.extend({
} else {
console.log('Menu no action found web test 04 will fail');
}
this._isActionId = action_id === undefined ? false : true;
this.open_menu(id);
},
@ -204,6 +304,8 @@ var Menu = Widget.extend({
},
on_menu_click: function(ev) {
ev.preventDefault();
if(!parseInt($(ev.currentTarget).data('menu'))) return;
this._isMainMenuClick = $(ev.currentTarget).attr('class').indexOf('oe_main_menu') !== -1 ? true : false;
this.menu_click($(ev.currentTarget).data('menu'));
},
});

View File

@ -0,0 +1,30 @@
flectra.define('web.UserLogout', function (require) {
"use strict";
var SystrayMenu = require('web.SystrayMenu');
var Widget = require('web.Widget');
var UserLogout = Widget.extend({
template:"UserLogout.Action",
events: {
"click": "on_click",
},
init: function () {
this._super.apply(this, arguments);
},
start: function () {
return this._super();
},
on_click:function (e) {
this.trigger_up('clear_uncommitted_changes', {
callback: this.do_action.bind(this, 'logout'),
});
}
});
SystrayMenu.Items.push(UserLogout);
return {
UserLogout: UserLogout,
};
});

View File

@ -116,3 +116,113 @@ var UserMenu = Widget.extend({
return UserMenu;
});
flectra.define('web.UserProfile', function (require) {
"use strict";
var framework = require('web.framework');
var Widget = require('web.Widget');
var UserProfile = Widget.extend({
template: 'UserProfile',
/**
* @override
* @returns {Deferred}
*/
start: function () {
var self = this;
var session = this.getSession();
this.$el.on('click', 'li a[data-menu]', function (ev) {
ev.preventDefault();
var menu = $(this).data('menu');
self['_onMenu' + menu.charAt(0).toUpperCase() + menu.slice(1)]();
});
return this._super.apply(this, arguments).then(function () {
var $avatar = self.$('.profile_pic img');
if (!session.uid) {
$avatar.attr('src', $avatar.data('default-src'));
return $.when();
}
self.$('.profile_name').text(session.name);
if (session.debug) {
self.$el.addClass('debug')
self.$('.db_name').text('(' + session.db + ')');
}
var avatar_src = session.url('/web/image', {
model:'res.users',
field: 'image_small',
id: session.uid,
});
$avatar.attr('src', avatar_src);
});
},
//--------------------------------------------------------------------------
// Handlers
//--------------------------------------------------------------------------
/**
* @private
*/
_onMenuAccount: function () {
var self = this;
this.trigger_up('clear_uncommitted_changes', {
callback: function () {
self._rpc({route: '/web/session/account'})
.then(function (url) {
framework.redirect(url);
})
.fail(function (result, ev){
ev.preventDefault();
framework.redirect('https://accounts.flectrahq.com/account');
});
},
});
},
/**
* @private
*/
_onMenuDocumentation: function () {
window.open('https://www.flectrahq.com/documentation/user', '_blank');
},
/**
* @private
*/
_onMenuLogout: function () {
this.trigger_up('clear_uncommitted_changes', {
callback: this.do_action.bind(this, 'logout'),
});
},
/**
* @private
*/
_onMenuSettings: function () {
var self = this;
var session = this.getSession();
this.trigger_up('clear_uncommitted_changes', {
callback: function () {
self._rpc({
route: "/web/action/load",
params: {
action_id: "base.action_res_users_my",
},
})
.done(function (result) {
result.res_id = session.uid;
self.do_action(result);
});
},
});
},
/**
* @private
*/
_onMenuSupport: function () {
window.open('https://www.flectrahq.com/buy', '_blank');
},
});
return UserProfile;
});

View File

@ -9,6 +9,8 @@ var Menu = require('web.Menu');
var session = require('web.session');
var SystrayMenu = require('web.SystrayMenu');
var UserMenu = require('web.UserMenu');
var UserProfile = require('web.UserProfile');
var config = require('web.config');
return AbstractWebClient.extend({
events: {
@ -34,11 +36,19 @@ return AbstractWebClient.extend({
this.menu = new Menu(this);
this.menu.setElement(this.$el.parents().find('.oe_application_menu_placeholder'));
this.menu.on('menu_click', this, this.on_menu_action);
if (config.device.size_class < config.device.SIZES.SM) {
this.menu.is_menus_lite_mode = false;
}else{
this.menu.is_menus_lite_mode = 'menus_lite_mode' in window.sessionStorage ? true : false;
}
// Create the user menu (rendered client-side)
this.user_menu = new UserMenu(this);
this.user_profile = new UserProfile(this);
var $user_menu_placeholder = $('body').find('.oe_user_menu_placeholder').show();
var $oe_application_menu_placeholder = $('body').find('.f_launcher_content');
var user_menu_loaded = this.user_menu.appendTo($user_menu_placeholder);
this.user_profile.prependTo($oe_application_menu_placeholder);
// Create the systray menu (rendered server-side)
this.systray_menu = new SystrayMenu(this);

View File

@ -838,6 +838,7 @@ var FormRenderer = BasicRenderer.extend({
widget.renderWithLabel($label);
}
});
this.$el.find('.o_notebook ul.nav-tabs').tabCollapse();
},
/**
* Sets id attribute of given widget to idForLabel

View File

@ -636,7 +636,7 @@ var ListRenderer = BasicRenderer.extend({
return this._super();
}
var $table = $('<table>').addClass('o_list_view table table-condensed table-striped');
var $table = $('<table>').addClass('o_list_view table table-condensed table-hover');
this.$el
.addClass('table-responsive')
.append($table);

View File

@ -0,0 +1,348 @@
// Superhero 3.3.7
// Bootswatch
// -----------------------------------------------------
// Navbar =====================================================================
.navbar {
.box-shadow(none);
border: none;
font-size: @font-size-small;
&-default {
.badge {
background-color: #fff;
color: @navbar-default-bg;
}
}
&-inverse {
.badge {
background-color: #fff;
color: @navbar-inverse-bg;
}
}
}
// Buttons ====================================================================
.btn {
&-default {
&:hover {
background-color: darken(@btn-default-bg, 3%);
}
}
&-sm,
&-xs {
font-size: @font-size-small;
}
}
// Typography =================================================================
.text-primary,
.text-primary:hover {
color: @brand-primary;
}
.text-success,
.text-success:hover {
color: @brand-success;
}
.text-danger,
.text-danger:hover {
color: @brand-danger;
}
.text-warning,
.text-warning:hover {
color: @brand-warning;
}
.text-info,
.text-info:hover {
color: @brand-info;
}
.page-header {
border-bottom-color: @table-border-color;
}
.dropdown-menu {
border-radius: 0;
margin: 2px 0 0;
> li > a {
font-size: @font-size-small;
}
}
.btn-group.open .dropdown-toggle {
.box-shadow(none);
}
.dropdown-header {
font-size: @font-size-small;
}
// Tables =====================================================================
table,
.table {
font-size: @font-size-small;
a:not(.btn) {
//color: #fff;
text-decoration: underline;
}
.dropdown-menu a {
text-decoration: none;
}
.text-muted {
color: @text-muted;
}
> thead > tr > th,
> tbody > tr > th,
> tfoot > tr > th,
> thead > tr > td,
> tbody > tr > td,
> tfoot > tr > td {
border-color: transparent;
}
}
// Forms ======================================================================
input,
textarea {
color: @input-color;
}
label,
.radio label,
.checkbox label,
.help-block {
font-size: @font-size-small;
}
.input-addon,
.input-group-addon {
color: @text-color;
}
.has-warning {
.help-block,
.control-label,
.radio,
.checkbox,
.radio-inline,
.checkbox-inline,
&.radio label,
&.checkbox label,
&.radio-inline label,
&.checkbox-inline label,
.form-control-feedback {
color: @brand-warning;
}
.form-control,
.form-control:focus {
border: 4px solid @brand-warning;
}
.input-group-addon {
border: none;
}
}
.has-error {
.help-block,
.control-label,
.radio,
.checkbox,
.radio-inline,
.checkbox-inline,
&.radio label,
&.checkbox label,
&.radio-inline label,
&.checkbox-inline label,
.form-control-feedback {
color: @brand-danger;
}
.form-control,
.form-control:focus {
border: 4px solid @brand-danger;
}
.input-group-addon {
border: none;
}
}
.has-success {
.help-block,
.control-label,
.radio,
.checkbox,
.radio-inline,
.checkbox-inline,
&.radio label,
&.checkbox label,
&.radio-inline label,
&.checkbox-inline label,
.form-control-feedback {
color: @brand-success;
}
.form-control,
.form-control:focus {
border: 4px solid @brand-success;
}
.input-group-addon {
border: none;
}
}
.form-control:focus {
.box-shadow(none);
}
.has-warning,
.has-error,
.has-success {
.form-control:focus {
.box-shadow(none);
}
}
// Navs =======================================================================
.nav {
.open > a,
.open > a:hover,
.open > a:focus {
border-color: transparent;
}
}
.nav-tabs {
> li > a {
color: @text-color;
}
}
.nav-pills {
> li > a {
color: @text-color;
}
}
.pager {
a {
color: @text-color;
}
}
.close {
opacity: 0.4;
&:hover,
&:focus {
opacity: 1;
}
}
// Progress bars ==============================================================
// Containers =================================================================
.well {
.box-shadow(none);
}
a.list-group-item {
&.active,
&.active:hover,
&.active:focus {
border: none;
}
&-success {
&.active {
background-color: @state-success-bg;
}
&.active:hover,
&.active:focus {
background-color: darken(@state-success-bg, 5%);
}
}
&-warning {
&.active {
background-color: @state-warning-bg;
}
&.active:hover,
&.active:focus {
background-color: darken(@state-warning-bg, 5%);
}
}
&-danger {
&.active {
background-color: @state-danger-bg;
}
&.active:hover,
&.active:focus {
background-color: darken(@state-danger-bg, 5%);
}
}
}
.panel {
border: none;
&-default > .panel-heading {
background-color: @table-bg-hover;
color: @text-color;
}
.text-muted {
color: rgba(255, 255, 255, 0.4);
}
}
.thumbnail {
background-color: @well-bg;
border: none;
}
.modal {
padding: 0;
&-header,
&-footer {
background-color: @table-bg-hover;
border: none;
border-radius: 0;
}
}
.popover {
&-title {
border: none;
}
}

View File

@ -0,0 +1,46 @@
.o_control_panel {
> .o_cp_searchview {
.f-search-view();
}
> .o_cp_right {
.o_cp_switch_buttons {
.btn {
color: @flectra-main-text-color;
background-color: transparent;
.box-shadow(none);
padding: 3px 6px;
&.active {
color: @brand-primary;
}
}
}
> .o_cp_pager {
.btn {
color: @brand-primary;
background-color: transparent;
}
}
}
> .o_cp_left {
> .o_cp_sidebar {
.o_hidden_input_file {
.o_form_binary_form span {
color: @flectra-brand-primary;
}
}
}
}
}
@media (max-width: @screen-xs-max) {
.o_control_panel {
> .o_cp_searchview, > .breadcrumb, > .o_cp_left, > .o_cp_right {
width: 100%;
}
.o_cp_left .o_cp_sidebar ul.dropdown-menu {
left: unset;
right: 0;
}
}
}

View File

@ -0,0 +1,135 @@
body {
width: 100%;
height: 100%;
.o_main_content {
overflow: auto;
}
@media (max-width: @screen-sm-max) {
overflow: inherit;
.o_main {
.oe-view-manager {
overflow: inherit;
}
}
}
a {
text-decoration: none !important;
}
}
.o_web_client {
background-color: #ffffff;
}
main {
width: 100%;
height: 100%;
overflow: hidden;
}
> label {
color: rgba(51, 51, 51, 0.66) !important;
}
.btn {
border-radius: 0 !important;
}
.badge {
border-radius: 0;
}
.o_tooltip {
border-color: @flectra-brand-primary;
background-color: @flectra-brand-primary;
&.right::before {
border-right-color: @flectra-brand-primary;
}
&.top::before {
border-top-color: @flectra-brand-primary;
}
&.left::before {
border-left-color: @flectra-brand-primary;
}
&.bottom::before {
border-bottom-color: @flectra-brand-primary;
}
&::after {
border-color: @flectra-brand-primary;
background: radial-gradient(lighten(@flectra-brand-primary, 7%), @flectra-brand-primary);
}
&.active {
&.right {
&::before {
border-right-color: @flectra-brand-primary;
}
}
&.top {
&::before {
border-top-color: @flectra-brand-primary;
}
}
&.left {
&::before {
border-left-color: @flectra-brand-primary;
}
}
&.bottom {
&::before {
border-bottom-color: @flectra-brand-primary;
}
}
}
}
div.o_checkbox {
display: inline-block;
position: relative;
vertical-align: sub;
> input {
width: 15px;
height: 15px;
margin: 0;
opacity: 0;
position: absolute;
top: auto;
left: auto;
bottom: auto;
right: auto;
cursor: pointer;
}
> input + span {
background-color: #fff;
border-radius: 1px;
border: 1px solid rgba(120, 130, 140, 0.75);
content: "";
display: inline-block;
height: 17px;
transition: 0.3s ease-in-out;
width: 17px;
outline: none;
}
> input:checked + span {
background-repeat: no-repeat;
background: @brand-primary url(/web/static/src/img/checked.svg);
background-position: center center;
}
> input:disabled + span {
opacity: 0.7;
border: 1px solid #e2e2e0;
}
> input:focus + span {
outline: 1px solid @brand-primary;
}
}
.o_dialog_error.modal-body{
.alert{
color: #8a6d3b;
}
}
.o_field_widget.o_field_many2one .o_external_button{
color:@brand-primary;
}

View File

@ -0,0 +1,158 @@
.f-form-view-responsive() {
@media (max-width: @screen-sm-max) {
.o_group_col_6, .o_inner_group {
width: 100%;
}
}
@media (max-width: 480px) {
.o_group_col_6, .o_inner_group {
tr {
.o-flex-display();
.o-flex-flow(row, wrap);
td {
.o-flex(1, 0, auto);
max-width: 100%;
width: auto !important;
display: block;
&.o_td_label {
width: 90% !important;
border: none;
}
.o_input_dropdown {
width: auto;
max-width: 100%;
}
.o_field_widget.o_field_many2one.o_with_button {
display: flex;
}
}
.o_td_label + td {
padding: 3px 5px 3px 5px;
}
.o_field_widget.o_text_overflow {
width: auto !important;
}
}
}
}
}
.o_form_view {
background-color: @flectra-color-silver;
.o_control_panel {
.o_panel {
.o_setting_search {
input {
background-color: transparent;
}
}
}
}
.o_form_sheet_bg {
background: transparent;
.o_form_sheet {
min-width: unset;
max-width: 1024px;
.oe_title {
width: auto;
}
.oe_button_box {
width: 100%;
margin-bottom: 20px;
}
@media (max-width: @screen-xs-max) {
margin: 24px 10px;
}
.f-form-view-responsive();
}
.oe_button_box {
.oe_stat_button {
.o_button_icon {
color: @flectra-brand-primary;
}
&:hover {
color: @flectra-main-text-color;
}
}
}
}
.o_form_statusbar {
> .o_statusbar_status {
> .o_arrow_button {
background-color: #ffffff;
&.disabled {
background-color: #ffffff;
}
&:before, &:after {
border-left: @flectra-statusbar-arrow-width solid #ffffff;
}
&:before {
right: -@flectra-statusbar-arrow-width;
border-left-color: @gray-lighter-dark;
}
&.btn-primary.disabled {
color: @flectra-brand-primary;
background-color: mix(@brand-primary, #ffffff, 8%);
&:after {
border-left-color: mix(@brand-primary, #ffffff, 8%);
}
}
}
> ul > li > .btn-default {
color: @btn-default-bg;
background-color: #ffffff;
&:hover {
color: @brand-primary;
background-color: @flectra-color-silver;
}
}
}
}
.oe_chatter {
background-color: #ffffff;
min-width: unset;
max-width: 1024px;
.o_mail_activity .o_thread_date:hover {
color: inherit;
}
}
.o_input, .o_input .o_input {
background-color: transparent;
border: none;
border-radius: 0;
border-bottom: 1px solid @flectra-main-text-color;
background-position: center bottom, center calc(100% - 1px);
background-repeat: no-repeat;
background-size: 0 2px, 100% 1px;
transition: background 0s ease-out 0s;
padding: 3px 0;
&:focus, &.focus {
background-image: linear-gradient(@brand-primary, @brand-primary), linear-gradient(#d9d9d9, #d9d9d9);
border: 0 none !important;
border-radius: 0;
box-shadow: none;
float: none;
background-size: 100% 2px, 100% 1px;
outline: 0 none;
transition-duration: 0.4s;
}
}
.o_required_modifier.o_input,
.o_required_modifier .o_input {
background-color: transparent !important;
border-bottom: 3px solid @flectra-main-text-color;
&:focus, &.focus {
background-size: 100% 3px, 100% 1px;
}
}
}
.modal-dialog {
.modal-content {
.o_form_view {
.f-form-view-responsive();
}
}
}

View File

@ -0,0 +1,13 @@
.o_list_view {
> thead, tfoot {
background-color: #ffffff;
}
tbody > tr.o_group_header {
background-color: @flectra-control-panel-background-color;
background-image: none;
border-bottom: 2px solid #ffffff;
}
> tfoot {
border-top: 0;
}
}

View File

@ -0,0 +1,85 @@
.oe_website_login_container {
vertical-align: middle;
position: relative;
height: 100%;
}
.oe_login_form {
vertical-align: middle;
padding: 50px !important;
border: 1px solid #DDD;
border-radius: 5px;
background-color: #FFF;
opacity: 0.9;
margin: 40px auto !important;
top: 20%;
min-width: 40%;
position: static !important;
.flectra-button(@color, @color-bg) {
border-radius: 0;
font-weight: bold;
color: @color-bg;
background-color: @color;
border-color: @color-bg;
&:hover, &:focus {
color: @color;
background-color: @color-bg;
border-color: darken(@color-bg, 30%);
}
}
.btn-default {
.flectra-button(@btn-default-bg, @btn-default-color);
}
.btn-primary {
.flectra-button(@btn-primary-color, @btn-primary-bg);
}
.btn-success {
.flectra-button(@btn-success-color, @btn-success-bg);
}
.btn-info {
.flectra-button(@btn-info-color, @btn-info-bg);
}
.btn-warning {
.flectra-button(@btn-warning-color, @btn-warning-bg);
}
.btn-danger {
.flectra-button(@btn-danger-color, @btn-danger-bg);
}
.field-db {
.input-group {
border-bottom: 1px solid #CCC;
input#db {
border: none;
}
}
}
input,
select {
background-color: transparent !important;
border-top: 0;
border-left: 0;
border-right: 0;
border-bottom: 1px solid #CCC;
border-radius: 0;
color: @brand-primary;
font-size: 18px;
font-weight: 300;
transition: border-color 0.7s ease;
box-shadow: none !important;
}
input:focus,
select:focus {
border-bottom: 1px solid @brand-primary;
outline: 0 none;
}
}

View File

@ -0,0 +1,400 @@
.o_web_client {
> .o_main {
.o_content {
background-color: @flectra-color-silver;
.o_view_manager_content {
background-color: @flectra-color-silver;
}
}
.f_launcher_close {
.f_launcher_content {
width: 0 !important;
}
}
.f_hide {
z-index: -1 !important;
.f_launcher_content {
width: 0 !important;
}
}
.f_launcher {
border-right: 1px solid @launcher-menu-border;
background-color: @launcher-menu-bg;
.f_launcher_content::-webkit-scrollbar {
display: none;
}
.f_launcher_content {
height: 100%;
width: 200px;
.o-transition(all, 300ms);
overflow-y: auto;
padding-bottom: 30px;
.user_profile {
padding: 10px;
position: relative;
height: 110px;
border-bottom: @flectra-main-color-muted;
background: linear-gradient(320deg, mix(@flectra-brand-primary, #000000, 70%) 35%, transparent 0%),
linear-gradient(250deg, mix(@flectra-brand-primary, #000000, 80%) 40%, transparent 0%),
linear-gradient(190deg, mix(@flectra-brand-primary, #000000, 50%) 30%, transparent 0%),
linear-gradient(10deg, mix(@flectra-brand-primary, #000000, 90%) 30%, transparent 100%),
linear-gradient(0deg, black 100%, transparent 0%);
background-size: 100%;
.o-transition(all, 0.5s);
.profile_pic {
text-align: center;
img {
max-width: 60px;
max-height: 100%;
}
}
.profile_info {
width: 100%;
text-align: center;
padding: 6px 0;
> .dropdown {
> a {
cursor: pointer;
font-size: 15px;
color: #ffffff;
font-weight: bold;
.db_name {
font-size: 10px;
display: block;
text-align: center;
white-space: nowrap;
overflow: hidden;
text-overflow: ellipsis;
}
}
> ul {
right: 0;
> li {
text-align: center;
margin: 5px;
}
}
}
}
&.close_profile {
height: 0 !important;
padding: 0;
position: relative;
.o-transition(all, 0.3s);
}
&.debug {
height: 118px;
}
}
> ul {
list-style-type: none;
position: relative;
padding: 0;
> li.panel {
background-color: #ffffff;
margin: 0;
border-radius: 0;
&:first-child > .oe_main_menu_container {
border-top: 1px solid @launcher-menu-border;
}
> .oe_main_menu_container {
display: flex;
width: 100%;
background-color: @launcher-menu-bg;
border-bottom: 1px solid @launcher-menu-border;
height: 45px;
> a {
display: flex;
width: 100%;
position: relative;
.app_icon, .app_name {
padding: 8px 5px 8px 10px;
}
.app_icon {
width: 45px;
> img {
width: 28px;
height: 28px;
object-fit: cover;
}
}
.app_name {
font-size: 15px;
color: @flectra-main-text-color;
margin: 4px 0;
white-space: nowrap;
overflow: hidden;
text-overflow: ellipsis;
max-width: 122px;
font-weight: bold;
}
}
.more-less {
margin: 13px;
> a {
cursor: pointer;
color: @flectra-main-text-color;
}
}
&.active {
background-color: mix(@brand-primary, #ffffff, 30%);
&:hover {
background-color: mix(@brand-primary, #ffffff, 30%);
}
}
&:hover {
background-color: #ffffff;
}
}
}
}
.oe_secondary_menu_section {
font-weight: bold;
text-align: left;
font-size: 14px;
text-transform: uppercase;
padding: 8px 0 8px 8px;
border-bottom: 1px solid @launcher-menu-border;
> a, > a:hover {
color: @flectra-main-text-color;
}
&.active > a {
color: @brand-primary;
}
}
.oe_secondary_submenu {
line-height: 1.1em;
> li {
> a {
padding: 10px 4px 10px 18px;
color: @flectra-main-text-color;
&:hover, &:focus {
color: @flectra-main-text-color;
background-color: @flectra-color-silver;
}
}
&.active > a {
color: @brand-primary;
background-color: @launcher-menu-bg;
}
}
.oe_secondary_submenu {
> li > a {
padding-left: 30px;
}
.oe_secondary_submenu > li > a {
padding-left: 42px;
}
}
.oe_menu_text {
max-width: 85%;
margin-top: 1px;
}
.oe_menu_toggler:before {
display: inline-block;
width: 0;
height: 0;
content: "&darr";
opacity: 0.5;
text-indent: -99999px;
vertical-align: top;
margin-left: -12px;
margin-top: 4px;
margin-right: 4px;
border-top: 4px solid transparent;
border-bottom: 4px solid transparent;
border-left: 4px solid @flectra-main-color-muted;
}
.oe_menu_opened:before {
margin-top: 6px;
margin-left: -16px;
margin-right: 4px;
border-left: 4px solid transparent;
border-right: 4px solid transparent;
border-top: 4px solid @flectra-main-color-muted;
}
}
}
.oe_secondary_menu {
li {
border: none !important;
}
}
&.f_hide {
border: none;
}
}
.f_search_launcher {
width: calc(~"100% - 400px");
height: 0;
position: fixed;
z-index: 999;
top: 62px;
left: 266px;
background-color: @launcher-menu-bg;
overflow: hidden;
.box-shadow(inset 0 -15px 15px -18px #000000);
.o-transition(all, 300ms);
.f_search_launcher_content {
position: relative;
width: 100%;
.f_apps_search_box {
align-items: center;
display: flex;
height: 56px;
border-bottom: 1px solid @launcher-menu-border;
.f_apps_search_icon {
padding: 8px;
font-size: 20px;
color: @flectra-main-text-color;
}
#f_clear_apps_search {
cursor: pointer;
}
input {
cursor: default;
}
.f_apps_search_input {
border: none;
padding: 5px;
color: @flectra-main-text-color;
font-size: 20px;
background-color: transparent;
.f-input-placeholder() {
color: @flectra-main-text-color;
opacity: 0.4;
}
&::-webkit-input-placeholder { /* Chrome/Opera/Safari */
.f-input-placeholder()
}
&::-moz-placeholder { /* Firefox 19+ */
.f-input-placeholder()
}
&:-ms-input-placeholder { /* IE 10+ */
.f-input-placeholder()
}
&:-moz-placeholder { /* Firefox 18- */
.f-input-placeholder()
}
&:focus {
outline: none;
border-bottom: none;
}
}
}
.f_apps_container {
.o-flex-display();
.o-flex-flow(column, nowrap);
.o-align-items(center);
.o-flex(1, 0, auto);
width: 100%;
overflow-y: auto;
.f_apps_content {
.o-flex(0, 0, auto);
width: 100%;
.clearfix();
margin: 10px 0;
.f_app {
width: 25%;
text-align: center;
padding: 20px;
float: left;
@media (min-width: @screen-xs-min) {
width: 25%;
}
@media (max-width: @screen-xs-max) {
padding: 10px;
.f_app_label {
font-size: small;
}
}
@media (min-width: 882px) {
width: 20%;
}
@media (min-width: @screen-md-min) {
width: 16.66%;
}
@media (min-width: @screen-lg-min) {
width: 12.5%;
}
@media (min-width: 1440px) {
width: 10%;
}
.f_app_icon {
max-width: 45px;
max-height: 100%;
width: 100%;
}
.f_app_label {
color: #000000;
white-space: nowrap;
overflow: hidden;
text-overflow: ellipsis;
padding-top: 5px;
}
&:hover {
background-color: fade(@brand-primary, 60%);
}
}
}
.f_app_footer {
.o-flex-display();
.o-flex(1, 0, auto);
align-items: flex-end;
margin: 10px 0;
> img {
max-width: 100px;
}
}
}
}
&.launcher_opened {
border: 1px solid @launcher-menu-border;
border-top: 0;
height: 356px;
.f_apps_container {
height: 300px;
}
@media (max-width: @screen-xs-max) {
height: 100%;
width: 100%;
left: auto;
.f_apps_container {
height: 100%;
}
@media (max-width: 480px) {
top: 46px;
}
}
}
}
.o_mail_chat .o_mail_chat_sidebar .o_mail_sidebar_title h4 {
color: #777777;
}
}
.o_loading {
background-color: darken(@brand-primary, 13.5%) !important;
top: inherit;
bottom: 0;
right: 0;
padding: 5px 50px;
border-radius: 0 !important;
opacity: 0.8;
}
}
@media (max-width: 767px) {
.o_main {
.f_launcher {
position: absolute;
z-index: 3 !important;
height: 100%;
}
}
}

View File

@ -0,0 +1,143 @@
nav#oe_main_menu_navbar {
background-color: transparent;
border-bottom: 1px solid @launcher-menu-border;
@media (max-width: @screen-xs-max) {
display: flex;
}
.color-line {
width: 100%;
display: flex;
@media (max-width: @screen-xs-max) {
position: absolute;
}
.color {
width: 20%;
height: 5px;
}
.color-1 {
background-color: @brand-primary;
}
.color-2 {
background-color: @brand-success;
}
.color-3 {
background-color: @brand-info;
}
.color-4 {
background-color: @brand-warning;
}
.color-5 {
background-color: @brand-danger;
}
}
.f_menu_systray {
width: 100%;
> ul {
@media (max-width: @screen-xs-max) {
display: flex;
margin: 0;
margin-top: 5px;
> li.open .dropdown-menu {
top: 62px;
left: 0;
bottom: 0;
right: 0;
position: fixed;
width: auto;
background-color: #ffffff;
}
ul.dropdown-menu > li > a {
color: @flectra-main-text-color;
}
}
> li {
> a {
padding: 15px 20px;
font-size: 20px;
height: 56px;
margin: 0;
color: lighten(@flectra-main-text-color, 30%);
> .badge {
top: 5px;
right: 5px;
padding: 2px 5px;
font-size: 11px;
font-weight: bold;
}
&:hover, &:focus {
background-color: lighten(@flectra-main-text-color, 65%);
}
}
> ul {
left: auto;
right: 0;
}
}
}
}
.f_toggle_buttons {
> ul {
@media (max-width: @screen-xs-max) {
display: flex;
margin: 0;
margin-top: 5px;
}
> li > a {
padding: 17px 24px;
font-size: 20px;
height: 56px;
color: @flectra-main-text-color;
margin: 0;
border-right: 1px solid @launcher-menu-border;
background-color: @launcher-menu-bg;
&:hover {
background-color: darken(@launcher-menu-bg, 1%);
}
}
}
> ul > li.f_company_name {
width: 201px;
> a {
padding: 3px;
text-align: center;
img {
max-height: 50px;
max-width: 100%;
}
}
}
}
@media (max-width: 480px) {
min-height: 45px;
.f_menu_systray {
> ul {
> li.open .dropdown-menu {
top: 46px;
}
> li {
> a {
padding: 10px 15px;
font-size: 15px;
height: 40px;
> .badge {
padding: 1px 3px;
font-size: 9px;
}
}
}
}
}
.f_toggle_buttons {
> ul > li {
> a {
padding: 10px 15px;
font-size: 10px;
height: 40px;
}
}
}
}
}

View File

@ -0,0 +1,22 @@
.f-search-view() {
.o_searchview {
border: none;
background-color: transparent;
> .o_searchview_facet {
> .o_searchview_facet_label {
color: @brand-primary;
background-color: #ffffff;
font-weight: bold;
}
> .o_facet_values {
background-color: #ffffff;
}
}
> .o_searchview_input {
border-bottom: 1px solid @flectra-main-text-color;
background-color: transparent;
}
}
}
.f-search-view();

View File

@ -0,0 +1,9 @@
/* ==========================================================================
Dark Nostalgia Color
========================================================================== */
@brand-primary: @dark-nostalgia-primary;
@brand-success: @dark-nostalgia-success;
@brand-info: @dark-nostalgia-info;
@brand-warning: @dark-nostalgia-warning;
@brand-danger: @dark-nostalgia-danger;

View File

@ -0,0 +1,9 @@
/* ==========================================================================
Lapine Colors
========================================================================== */
@brand-primary: @lapine-primary;
@brand-success: @lapine-success;
@brand-info: @lapine-info;
@brand-warning: @lapine-warning;
@brand-danger: @lapine-danger;

View File

@ -0,0 +1,9 @@
/* ==========================================================================
Muddy Rainbow Color
========================================================================== */
@brand-primary: @muddy-rainbow-primary;
@brand-success: @muddy-rainbow-success;
@brand-info: @muddy-rainbow-info;
@brand-warning: @muddy-rainbow-warning;
@brand-danger: @muddy-rainbow-danger;

View File

@ -0,0 +1,9 @@
/* ==========================================================================
Peaches and Plums Colors
========================================================================== */
@brand-primary: @peaches-plums-primary;
@brand-success: @peaches-plums-success;
@brand-info: @peaches-plums-info;
@brand-warning: @peaches-plums-warning;
@brand-danger: @peaches-plums-danger;

View File

@ -0,0 +1,9 @@
/* ==========================================================================
Sunset Dunes Colors
========================================================================== */
@brand-primary: @sunset-dunes-primary;
@brand-success: @sunset-dunes-success;
@brand-info: @sunset-dunes-info;
@brand-warning: @sunset-dunes-warning;
@brand-danger: @sunset-dunes-danger;

View File

@ -0,0 +1,9 @@
/* ==========================================================================
Warm Sunset Color
========================================================================== */
@brand-primary: @warm-sunset-primary;
@brand-success: @warm-sunset-success;
@brand-info: @warm-sunset-info;
@brand-warning: @warm-sunset-warning;
@brand-danger: @warm-sunset-danger;

View File

@ -0,0 +1,61 @@
.text-primary {
color: @brand-primary;
}
.text-success {
color: @brand-success;
}
.text-info {
color: @brand-info;
}
.text-warning {
color: @brand-warning;
}
.text-danger {
color: @brand-danger;
}
//Muddy Rainbow
@muddy-rainbow-primary: #009efb;
@muddy-rainbow-success: #37ad7e;
@muddy-rainbow-info: #84cc33;
@muddy-rainbow-warning: #c69817;
@muddy-rainbow-danger: #e13d14;
//Dark Nostalgia
@dark-nostalgia-primary: #a16358;
@dark-nostalgia-success: #b8945b;
@dark-nostalgia-info: #b1ba61;
@dark-nostalgia-warning: #70b061;
@dark-nostalgia-danger: #63a2b0;
//Warm Sunset
@warm-sunset-primary: #ff9300;
@warm-sunset-success: #fb5f02;
@warm-sunset-info: #b83709;
@warm-sunset-warning: #fbf23d;
@warm-sunset-danger: #ffaf04;
//Peaches and Plums
@peaches-plums-primary: #657248;
@peaches-plums-success: #789a58;
@peaches-plums-info: #582736;
@peaches-plums-warning: #e39573;
@peaches-plums-danger: #b25757;
//Lapine
@lapine-primary: #784418;
@lapine-success: #db9e1d;
@lapine-info: #810038;
@lapine-warning: #51001f;
@lapine-danger: #e39573;
//Sunset Dunes
@sunset-dunes-primary: #dd5d32;
@sunset-dunes-success: #d44025;
@sunset-dunes-info: #0a3536;
@sunset-dunes-warning: #1e675a;
@sunset-dunes-danger: #d8b45d;

View File

@ -0,0 +1,109 @@
/* CUSTOMIZE THEME - MODAL */
#theme_customize_backend {
.backend_theme_customizer_content {
background-color: #333333;
padding: 10px;
width: 220px;
.color_box {
input[type="radio"] {
display: none;
}
input[type="radio"] + label {
cursor: pointer;
display: block;
}
input[type="radio"] + label {
display: inline-block;
width: 25px;
height: 25px;
vertical-align: middle;
border-radius: 5px;
cursor: pointer;
}
input[type="radio"]:checked + label {
border: 3px solid mix(@brand-primary, #ffffff, 30%);
}
.color_box_header {
color: mix(@brand-primary, #ffffff, 30%);
}
.color_box_content {
display: flex;
.color_radio {
padding: 4px;
}
}
}
.font_box {
.font_box_header {
color: mix(@brand-primary, #ffffff, 30%);
}
.font_box_content {
.font_radio {
padding: 0 5px;
color: mix(@brand-primary, #ffffff, 30%);
display: inline-block;
width: 45%;
overflow: hidden;
white-space: nowrap;
text-overflow: ellipsis;
> * {
cursor: pointer;
}
&:hover, &:focus {
color: #ffffff;
}
}
}
}
}
//Custom Color Settings
/* Muddy Rainbow */
.muddy-rainbow-primary {
background-color: @muddy-rainbow-primary;
}
/* Dark Nostalgia */
.dark-nostalgia-primary {
background-color: @dark-nostalgia-primary;
}
/* Warm Sunset */
.warm-sunset-primary {
background-color: @warm-sunset-primary;
}
/* Peaches And Plums */
.peaches-plums-primary {
background-color: @peaches-plums-primary;
}
/* Lapine */
.lapine-primary {
background-color: @lapine-primary;
}
/* Sunset Dunes */
.sunset-dunes-primary {
background-color: @sunset-dunes-primary;
}
.dropdown-menu {
padding: 0;
}
}
.f_color_palette_loading {
background-color: rgba(0, 0, 0, 0.5);
position: fixed;
top: 0;
left: 0;
width: 100%;
height: 100%;
z-index: 1060;
}

View File

@ -0,0 +1,35 @@
/* Work Sans */
@font-face {
font-family: 'Work Sans';
src: local('Work Sans'), url('/web/static/src/fonts/google-fonts/WorkSans-Regular.ttf') format('truetype');
}
/* Expletus Sans */
@font-face {
font-family: 'Expletus Sans';
src: local('Expletus Sans'), url('/web/static/src/fonts/google-fonts/ExpletusSans-Regular.ttf') format('truetype');
}
/* Philosopher */
@font-face {
font-family: 'Philosopher';
src: local('Philosopher'), url('/web/static/src/fonts/google-fonts/Philosopher-Regular.ttf') format('truetype');
}
/* Titillium Web */
@font-face {
font-family: 'Titillium Web';
src: local('Titillium Web'), url('/web/static/src/fonts/google-fonts/TitilliumWeb-Regular.ttf') format('truetype');
}
/* Averia Libre */
@font-face {
font-family: 'Averia Libre';
src: local('Averia Libre'), url('/web/static/src/fonts/google-fonts/AveriaLibre-Regular.ttf') format('truetype');
}
/* Tillana */
@font-face {
font-family: 'Tillana';
src: local('Tillana'), url('/web/static/src/fonts/google-fonts/Tillana-Regular.ttf') format('truetype');
}

View File

@ -0,0 +1,3 @@
body {
font-family: 'Averia Libre', cursive;
}

View File

@ -0,0 +1,3 @@
body {
font-family: 'Expletus Sans', cursive;
}

View File

@ -0,0 +1,3 @@
body {
font-family: 'Philosopher', sans-serif;
}

View File

@ -0,0 +1,3 @@
body {
font-family: 'Tillana', cursive;
}

View File

@ -0,0 +1,3 @@
body {
font-family: 'Titillium Web', sans-serif;
}

View File

@ -0,0 +1,3 @@
body {
font-family: 'Work Sans', sans-serif;
}

View File

@ -0,0 +1,12 @@
@flectra-brand-primary: @brand-primary;
@flectra-brand-optional: @brand-primary;
@flectra-brand-secondary: #f0eeee;
@flectra-brand-lightsecondary: #e2e2e0;
@flectra-color-pink: @brand-primary;
@flectra-main-color-muted: #a8a8a8;
@flectra-main-text-color: #4c4c4c;
@flectra-view-background-color: white;
@flectra-shadow-color: #303030;
@custom-text-color: #54667a;

View File

@ -6,9 +6,14 @@
@grid-gutter-width: @flectra-horizontal-padding*2;
//== Colors
@brand-primary: @flectra-brand-primary;
@gray-lighter: @flectra-color-silver;
@brand-primary: #009efb;
@brand-success: #5cb85c;
@brand-info: #31708f;
@brand-warning: orange;
@brand-danger: #d9534f;
//== Titles
@font-size-h1: @flectra-font-size-base + 13px;
@font-size-h2: @flectra-font-size-base + 7px;
@ -38,6 +43,9 @@
@badge-line-height: @line-height-base;
@badge-font-weight: normal;
//== Control Panel
@flectra-control-panel-background-color: @flectra-color-silver;
//== Breadcrumbs
@breadcrumb-active-color: #777777;
@breadcrumb-bg: @flectra-control-panel-background-color;
@ -96,17 +104,21 @@
@nav-tabs-active-link-hover-bg: white;
//== Navbar
@navbar-height: @flectra-navbar-height - 2;
@navbar-height: @flectra-navbar-height + 28;
@navbar-margin-bottom: 0;
@navbar-inverse-bg: #222222;
@navbar-inverse-link-color: #9d9d9d;
@navbar-inverse-link-hover-bg: #222222;
@navbar-inverse-bg: @brand-primary;
@navbar-inverse-link-color: #ffffff;
@navbar-inverse-link-hover-bg: darken(@brand-primary, 5%);
@navbar-inverse-toggle-hover-bg: #222222;
@navbar-border-radius: 0;
//== Tables
@table-bg-accent: #efeff8; // FIXME: expose
//== menu launcher
@launcher-menu-bg : #f7f9fa;
@launcher-menu-border : #eaeaea;
// ------------------------------------------------------------------
// Bootstrap components rules (non exposed features variables)
// ------------------------------------------------------------------
@ -163,3 +175,27 @@
overflow-x: initial;
}
}
@btn-default-color: #fff;
@btn-default-bg: @gray-light;
@btn-default-border: transparent;
@btn-primary-color: #fff;
@btn-primary-bg: @brand-success;
@btn-primary-border: transparent;
@btn-success-color: #fff;
@btn-success-bg: @brand-success;
@btn-success-border: transparent;
@btn-info-color: #fff;
@btn-info-bg: @brand-info;
@btn-info-border: transparent;
@btn-warning-color: #fff;
@btn-warning-bg: @brand-warning;
@btn-warning-border: transparent;
@btn-danger-color: #fff;
@btn-danger-bg: @brand-danger;
@btn-danger-border: transparent;

View File

@ -27,6 +27,7 @@
font-size: 19px;
color: #7C7BAD;
border: none;
background-color: transparent !important;
&:hover {
background-color: transparent;
}

View File

@ -7,11 +7,11 @@
@flectra-font-size-base: 13px;
// Colors
@flectra-brand-primary: #7c7bad;
@flectra-brand-optional: #7c7bad;
@flectra-brand-primary: #009efb;
@flectra-brand-optional: #009efb;
@flectra-brand-secondary: #f0eeee;
@flectra-brand-lightsecondary: #e2e2e0;
@flectra-color-silver: #F9F9F9;
@flectra-color-silver: #f1f3f6;
@flectra-color-silver-dark: #E5E5E5;
@flectra-color-silver-darker: #d9d7d7;

View File

@ -0,0 +1,38 @@
<?xml version="1.0" encoding="UTF-8"?>
<templates id="template" xml:space="preserve">
<div t-name="AppsLauncher" class="f_search_launcher">
<div class="f_search_launcher_content">
<div class="f_apps_search_box col-md-12 col-sm-12 col-xs-12">
<span><i class="fa fa-search f_apps_search_icon"/></span>
<input type="text" placeholder="Search..." class="f_apps_search_input"/>
<span><i class="fa fa-times-circle f_apps_search_icon" id="f_clear_apps_search"/></span>
</div>
<div class="f_apps_container">
<div class="f_apps_content">
<t t-call="AppsLauncher.Menus"/>
</div>
<div class="f_app_footer">
<img src="/web/static/src/img/logo.png"/>
</div>
</div>
</div>
</div>
<t t-name="AppsLauncher.Menus">
<t t-if="dashboard_apps">
<t t-foreach="dashboard_apps" t-as="dashboard_app">
<a class="f_app"
t-att-href="dashboard_app.href ? dashboard_app.href : ('#menu_id=' + dashboard_app.id + '&amp;action=' + dashboard_app.action.split(',')[1])"
t-att-data-menu="dashboard_app.id"
t-att-data-action-id="dashboard_app.action">
<img class="f_app_icon" t-att-src="dashboard_app.web_icon_data ? 'data:image/png;base64,' + dashboard_app.web_icon_data : '/base/static/description/icon.png'"/>
<div class="f_app_label"><t t-esc="dashboard_app.name"/></div>
</a>
</t>
</t>
<div class="text-center" t-if="dashboard_apps == ''">
<div class="mt8" style="font-size: 22px;">Sorry, unable to find your content!</div>
</div>
</t>
</templates>

View File

@ -0,0 +1,131 @@
<?xml version="1.0" encoding="UTF-8"?>
<templates id="template" xml:space="preserve">
<!--Customize Model-->
<t t-name="web.customize_menu">
<li id="theme_customize_backend" class="hidden-sm hidden-xs">
<a class="dropdown-toggle" data-toggle="dropdown" aria-expanded="false" href="#" title="Theme Customizer">
<i class="fa fa-cogs"/>
</a>
<ul class="dropdown-menu" role="menu"/>
</li>
</t>
<t t-name="web.theme_customize_backend">
<li>
<div class="backend_theme_customizer_content">
<div class="color_box">
<div class="color_box_header">
<h3>Colors</h3>
</div>
<div class="color_box_content">
<div class="color_radio scheme_color_muddy_rainbow">
<input id="scheme_color_muddy_rainbow"
type="radio"
name="scheme_color_var"
data-xmlid="web.color_muddy_rainbow"
active="True"/>
<label for="scheme_color_muddy_rainbow" class="muddy-rainbow-primary" title="Muddy Rainbow"/>
</div>
<div class="color_radio scheme_color_dark_nostalgia">
<input id="scheme_color_dark_nostalgia"
type="radio"
name="scheme_color_var"
data-xmlid="web.color_dark_nostalgia"/>
<label for="scheme_color_dark_nostalgia" class="dark-nostalgia-primary" title="Dark Nostalgia"/>
</div>
<div class="color_radio scheme_color_warm_sunset">
<input id="scheme_color_warm_sunset"
type="radio"
name="scheme_color_var"
data-xmlid="web.color_warm_sunset"/>
<label for="scheme_color_warm_sunset" class="warm-sunset-primary" title="Warm Sunset"/>
</div>
<div class="color_radio scheme_color_peaches_plums">
<input id="scheme_color_peaches_plums"
type="radio"
name="scheme_color_var"
data-xmlid="web.color_peaches_plums"/>
<label for="scheme_color_peaches_plums" class="peaches-plums-primary" title="Peaches and plums"/>
</div>
<div class="color_radio scheme_color_lapine">
<input id="scheme_color_lapine"
type="radio"
name="scheme_color_var"
data-xmlid="web.color_lapine"/>
<label for="scheme_color_lapine" class="lapine-primary" title="Lapine"/>
</div>
<div class="color_radio scheme_color_sunset_dunes">
<input id="scheme_color_sunset_dunes"
type="radio"
name="scheme_color_var"
data-xmlid="web.color_sunset_dunes"/>
<label for="scheme_color_sunset_dunes" class="sunset-dunes-primary" title="Sunset Dunes"/>
</div>
</div>
</div>
<div class="font_box">
<div class="font_box_header">
<h3>Fonts</h3>
</div>
<div class="font_box_content">
<div class="font_radio">
<input name="font_var"
type="radio"
id="font_work_sans"
data-xmlid="web.font_work_sans"
active="True"/>
<label for="font_work_sans" style="font-family: 'Work Sans';" title="Work Sans">Work Sans</label>
</div>
<div class="font_radio">
<input name="font_var"
type="radio"
id="font_expletus_sans"
data-xmlid="web.font_expletus_sans"/>
<label for="font_expletus_sans" style="font-family: 'Expletus Sans';" title="Expletus Sans">Expletus Sans</label>
</div>
<div class="font_radio">
<input name="font_var"
type="radio"
id="font_philosopher"
data-xmlid="web.font_philosopher"/>
<label for="font_philosopher" style="font-family: 'Philosopher';" title="Philosopher">Philosopher</label>
</div>
<div class="font_radio">
<input name="font_var"
type="radio"
id="font_titillium_web"
data-xmlid="web.font_titillium_web"/>
<label for="font_titillium_web" style="font-family: 'Titillium Web';" title="Titillium Web">Titillium Web</label>
</div>
<div class="font_radio">
<input name="font_var"
type="radio"
id="font_averia_libre"
data-xmlid="web.font_averia_libre"/>
<label for="font_averia_libre" style="font-family: 'Averia Libre';" title="Averia Libr">Averia Libre</label>
</div>
<div class="font_radio">
<input name="font_var"
type="radio"
id="font_tillana"
data-xmlid="web.font_tillana"/>
<label for="font_tillana" style="font-family: 'Tillana'" title="Tillana">Tillana</label>
</div>
</div>
</div>
</div>
</li>
</t>
<t t-name="web.color_palette_loading">
<div class="f_color_palette_loading">
<div style="left: 50%; top: 40%; position: absolute;">
<img class="img img-responsive" src="/web/static/src/img/gears.svg"/>
<span style="color: #ffffff; font-size: 20px;">Loading...</span>
</div>
</div>
</t>
</templates>

View File

@ -376,7 +376,7 @@
</t>
<div t-name="ListView" class="table-responsive">
<table class="o_list_view table table-condensed table-striped">
<table class="o_list_view table table-condensed table-hover">
<t t-set="columns_count" t-value="visible_columns.length + (options.selectable ? 1 : 0) + (options.deletable ? 1 : 0)"/>
<thead>
<tr t-if="options.header">
@ -1272,8 +1272,8 @@
<t t-name="Throbber">
<div>
<div class="oe_blockui_spin" style="height: 50px">
<img src="/web/static/src/img/spin.png" style="animation: fa-spin 1s infinite steps(12);"/>
<div class="oe_blockui_spin mt32 mb32" style="height: 50px">
<img src="/web/static/src/img/gears.svg"/>
</div>
<br />
<div class="oe_throbber_message" style="color:white"></div>
@ -1352,7 +1352,7 @@
<li class="o_user_menu">
<a class="dropdown-toggle" data-toggle="dropdown" aria-expanded="false" href="#">
<img class="img-circle oe_topbar_avatar" t-att-src="_s + '/web/static/src/img/user_menu_avatar.png'"/>
<span class="oe_topbar_name"/>
<span class="oe_topbar_name hidden-xs"/>
</a>
<ul class="dropdown-menu" role="menu">
<t t-call="UserMenu.Actions"/>
@ -1368,6 +1368,38 @@
<li><a href="#" data-menu="logout">Log out</a></li>
</t>
<t t-name="UserProfile">
<div class="user_profile close_profile">
<div class="profile_pic">
<img class="img-circle" t-att-src="_s + '/web/static/src/img/user_menu_avatar.png'"/>
</div>
<div class="profile_info">
<div class="dropdown">
<a class="dropdown-toggle" type="button" data-toggle="dropdown">
<span class="profile_name"/>
<span class="caret"/>
<span class="db_name"/>
</a>
<t t-call="UserProfile.Actions"/>
</div>
</div>
</div>
</t>
<t t-name="UserProfile.Actions">
<ul class="dropdown-menu">
<li><a href="#" data-menu="documentation">Documentation</a></li>
<li><a href="#" data-menu="support">Support</a></li>
<li><a href="#" data-menu="settings">Preferences</a></li>
<li class="divider"/>
<li><a href="#" data-menu="logout">Log out</a></li>
</ul>
</t>
<t t-name="UserLogout.Action">
<li class="o_user_logout" ><a href="#" data-menu="logout" title="Logout"><i class="fa fa-sign-out"/></a></li>
</t>
<t t-name="SwitchCompanyMenu">
<li class="o_switch_company_menu">
<a class="dropdown-toggle" data-toggle="dropdown" aria-expanded="false" href="#">

View File

@ -143,6 +143,7 @@
<script type="text/javascript" src="/web/static/lib/py.js/lib/py.js"></script>
<!-- Special case: core.js declares $.browser needed by ba-bbq -->
<script type="text/javascript" src="/web/static/lib/jquery.ba-bbq/jquery.ba-bbq.js"></script>
<script type="text/javascript" src="/web/static/lib/jquery.nav-tabs-to-accordion/jquery.nav-tabs-to-accordion.js"></script>
<script type="text/javascript" src="/web/static/src/js/core/domain.js"></script>
<script type="text/javascript" src="/web/static/src/js/core/pyeval.js"></script>
@ -159,6 +160,7 @@
<script type="text/javascript" src="/web/static/src/js/services/session.js"></script>
<script type="text/javascript" src="/web/static/src/js/widgets/auto_complete.js"></script>
<script type="text/javascript" src="/web/static/src/js/widgets/change_password.js"></script>
<script type="text/javascript" src="/web/static/src/js/chrome/user_logout.js"></script>
<script type="text/javascript" src="/web/static/src/js/widgets/debug_manager.js"></script>
<script type="text/javascript" src="/web/static/src/js/widgets/data_export.js"></script>
<script type="text/javascript" src="/web/static/src/js/widgets/date_picker.js"></script>
@ -174,6 +176,7 @@
<script type="text/javascript" src="/web/static/src/js/widgets/switch_company_menu.js"></script>
<script type="text/javascript" src="/web/static/src/js/chrome/user_menu.js"></script>
<script type="text/javascript" src="/web/static/src/js/chrome/menu.js"></script>
<script type="text/javascript" src="/web/static/src/js/chrome/apps.js"></script>
<script type="text/javascript" src="/web/static/src/js/chrome/search_view.js"></script>
<script type="text/javascript" src="/web/static/src/js/chrome/search_filters.js"></script>
<script type="text/javascript" src="/web/static/src/js/chrome/search_inputs.js"></script>
@ -248,12 +251,104 @@
<script type="text/javascript" src="/web/static/src/js/views/gantt/gantt_view.js"/>
<!-- @Flectra: Gantt View Assets ::: End -->
<link rel="stylesheet" type="text/less" href="/web/static/src/less/backend_theme/bootswatch_dark.less"/>
<link rel="stylesheet" type="text/less" href="/web/static/src/less/backend_theme/menu_launcher.less"/>
<link rel="stylesheet" type="text/less" href="/web/static/src/less/backend_theme/navbar.less"/>
<link rel="stylesheet" type="text/less" href="/web/static/src/less/backend_theme/flectra_style.less"/>
<link rel="stylesheet" type="text/less" href="/web/static/src/less/backend_theme/search_view.less"/>
<link rel="stylesheet" type="text/less" href="/web/static/src/less/backend_theme/form_view.less"/>
<link rel="stylesheet" type="text/less" href="/web/static/src/less/backend_theme/list_view.less"/>
<link rel="stylesheet" type="text/less" href="/web/static/src/less/backend_theme/control_panel.less"/>
<link rel="stylesheet" type="text/less" href="/web/static/src/less/backend_theme_customizer/colors.less"/>
<link rel="stylesheet" type="text/less" href="/web/static/src/less/backend_theme_customizer/customize_model.less"/>
<link rel="stylesheet" type="text/less" href="/web/static/src/less/backend_theme_customizer/variables.less"/>
<link rel="stylesheet" type="text/less" href="/web/static/src/less/backend_theme_customizer/font.less"/>
<script type="text/javascript" src="/web/static/src/js/backend_theme_customizer/backend_theme_customizer.js"/>
<script type="text/javascript" src="/web/static/src/js/backend_theme_customizer/customize_switcher.js"/>
</template>
<!-- Backend Theme Customizer Main Color -->
<template id="color_muddy_rainbow" name="option_color_muddy_rainbow" inherit_id="web.assets_backend" active="True" >
<xpath expr="." position="inside">
<link rel="stylesheet" type="text/less" href="/web/static/src/less/backend_theme_customizer/color_options/muddy_rainbow.less"/>
</xpath>
</template>
<template id="color_dark_nostalgia" name="option_color_dark_nostalgia" inherit_id="web.assets_backend" active="False" >
<xpath expr="." position="inside">
<link rel="stylesheet" type="text/less" href="/web/static/src/less/backend_theme_customizer/color_options/dark_nostalgia.less"/>
</xpath>
</template>
<template id="color_warm_sunset" name="option_color_warm_sunset" inherit_id="web.assets_backend" active="False" >
<xpath expr="." position="inside">
<link rel="stylesheet" type="text/less" href="/web/static/src/less/backend_theme_customizer/color_options/warm_sunset.less"/>
</xpath>
</template>
<template id="color_peaches_plums" name="option_color_peaches_plums" inherit_id="web.assets_backend" active="False" >
<xpath expr="." position="inside">
<link rel="stylesheet" type="text/less" href="/web/static/src/less/backend_theme_customizer/color_options/peaches_plums.less"/>
</xpath>
</template>
<template id="color_lapine" name="option_color_lapine" inherit_id="web.assets_backend" active="False" >
<xpath expr="." position="inside">
<link rel="stylesheet" type="text/less" href="/web/static/src/less/backend_theme_customizer/color_options/lapine.less"/>
</xpath>
</template>
<template id="color_sunset_dunes" name="option_color_sunset_dunes" inherit_id="web.assets_backend" active="False" >
<xpath expr="." position="inside">
<link rel="stylesheet" type="text/less" href="/web/static/src/less/backend_theme_customizer/color_options/sunset_dunes.less"/>
</xpath>
</template>
<!-- Backend Theme Customizer Font -->
<template id="font_work_sans" name="font_work_sans" inherit_id="web.assets_backend" active="True" >
<xpath expr="." position="inside">
<link rel="stylesheet" type="text/less" href="/web/static/src/less/backend_theme_customizer/font_options/work_sans.less"/>
</xpath>
</template>
<template id="font_expletus_sans" name="font_expletus_sans" inherit_id="web.assets_backend" active="False" >
<xpath expr="." position="inside">
<link rel="stylesheet" type="text/less" href="/web/static/src/less/backend_theme_customizer/font_options/expletus_sans.less"/>
</xpath>
</template>
<template id="font_philosopher" name="font_philosopher" inherit_id="web.assets_backend" active="False" >
<xpath expr="." position="inside">
<link rel="stylesheet" type="text/less" href="/web/static/src/less/backend_theme_customizer/font_options/philosopher.less"/>
</xpath>
</template>
<template id="font_titillium_web" name="font_titillium_web" inherit_id="web.assets_backend" active="False" >
<xpath expr="." position="inside">
<link rel="stylesheet" type="text/less" href="/web/static/src/less/backend_theme_customizer/font_options/titillium_web.less"/>
</xpath>
</template>
<template id="font_averia_libre" name="font_averia_libre" inherit_id="web.assets_backend" active="False" >
<xpath expr="." position="inside">
<link rel="stylesheet" type="text/less" href="/web/static/src/less/backend_theme_customizer/font_options/averia_libre.less"/>
</xpath>
</template>
<template id="font_tillana" name="font_tillana" inherit_id="web.assets_backend" active="False" >
<xpath expr="." position="inside">
<link rel="stylesheet" type="text/less" href="/web/static/src/less/backend_theme_customizer/font_options/tillana.less"/>
</xpath>
</template>
<template id="web.assets_frontend" name="Website Assets">
<t t-call="web.less_helpers"/>
<link rel="stylesheet" type="text/less" href="/web/static/src/less/import_bootstrap.less"/>
<link rel="stylesheet" type="text/less" href="/web/static/src/less/backend_theme/login_form.less"/>
<script type="text/javascript" src="/web/static/src/js/services/session.js"></script>
</template>
@ -295,7 +390,7 @@
<div class="row">
<div class="col-md-6 col-md-offset-3 o_database_list">
<div class="text-center">
<div class="text-center mt32">
<img t-attf-src="/web/binary/company_logo{{ '?dbname='+db if db else '' }}"/>
</div>
<t t-raw="0"/>
@ -351,25 +446,74 @@
</template>
<template id="web.menu">
<ul class="nav navbar-nav navbar-left oe_application_menu_placeholder" style="display: none;">
<li t-foreach="menu_data['children']" t-as="menu">
<t t-call="web.menu_link"/>
</li>
<li id="menu_more_container" class="dropdown" style="display: none;">
<a href="#" class="dropdown-toggle" data-toggle="dropdown">More <b class="caret"></b></a>
<ul id="menu_more" class="dropdown-menu"></ul>
</li>
</ul>
<ul class="nav navbar-nav navbar-right oe_user_menu_placeholder" style="display: none;"/>
<ul class="nav navbar-nav navbar-right oe_systray" style="display: none;"/>
<ul class="nav navbar-nav pull-right oe_systray" style="display: none;"/>
</template>
<template id="web.menu_launcher">
<div class="f_launcher_content">
<ul style="display: none;" class="oe_application_menu_placeholder hidden">
<li t-foreach="menu_data['children']" t-as="menu">
<t t-call="web.menu_link"/>
</li>
</ul>
<ul id="menu_launcher">
<li t-foreach="menu_data['children']" t-as="menu" class="panel">
<div class="oe_main_menu_container"
data-toggle="tooltip"
data-placement="right"
t-att-title="menu['name']">
<a t-att-href="'#menu_id=%s&amp;action=%s' % (menu['id'], menu['action'] and menu['action'].split(',')[1] or '')"
class="oe_main_menu"
t-att-data-menu="menu['id']"
t-att-data-menu-xmlid="menu.get('xmlid')"
t-att-data-action-model="menu['action'] and menu['action'].split(',')[0] or None"
t-att-data-action-id="menu['action'] and menu['action'].split(',')[1] or None">
<div class="app_icon">
<t t-if="menu['web_icon_data']">
<img t-att-src="'data:image/png;base64,%s' % (menu['web_icon_data'].decode('utf-8'))"/>
</t>
<t t-else="">
<t t-if="menu['web_icon']">
<t t-set="web_icon_data" t-value="menu['web_icon'].split(',')"/>
<div class="material-icons" t-att-style="'color: %s; background-color: %s; font-size: 27px;' % (web_icon_data[0], web_icon_data[1])">
<t t-esc="web_icon_data[2]"/>
</div>
</t>
<t t-else="">
<img src="/base/static/description/icon.png"/>
</t>
</t>
</div>
<div class="app_name">
<span class="oe_menu_text">
<t t-esc="menu['name']"/>
</span>
</div>
</a>
<div class="more-less">
<a data-toggle="collapse" data-parent="#menu_launcher" t-att-href="'#collapse-%s' %(menu['id'])">
<i t-att-class="'fa fa-chevron-down' if menu['children'] else 'hidden'"/>
</a>
</div>
</div>
<div t-att-id="'collapse-%s' % ( menu['id'] )" class="oe_secondary_menu collapse" t-att-data-menu-parent="menu['id']">
<t t-foreach="menu['children']" t-as="menu">
<div class="oe_secondary_menu_section" t-att-data-menu-xmlid="menu.get('xmlid')">
<t t-if="menu['children']">
<t t-esc="menu['name']"/>
</t>
<t t-if="not menu['children']">
<t t-call="web.menu_link"/>
</t>
</div>
<t t-call="web.menu_secondary_submenu"/>
</t>
</div>
</li>
</ul>
</div>
</template>
<template id="web.menu_secondary">
<a class="o_sub_menu_logo" t-att-href="'/web/?debug' if debug else '/web'">
<span class="oe_logo_edit">Edit Company data</span>
<img src='/web/binary/company_logo'/>
</a>
<div class="o_sub_menu_content">
<div class="o_menu_content">
<t t-foreach="menu_data['children']" t-as="menu">
<div style="display: none" class="oe_secondary_menu" t-att-data-menu-parent="menu['id']">
<t t-foreach="menu['children']" t-as="menu">
@ -637,20 +781,38 @@
<t t-set="body_classname" t-value="'o_web_client'"/>
<nav id="oe_main_menu_navbar" class="navbar navbar-inverse" groups="base.group_user,base.group_portal">
<div class="navbar-header">
<button type="button" class="navbar-toggle" data-toggle="collapse" data-target=".navbar-collapse">
<span class="icon-bar"></span>
<span class="icon-bar"></span>
<span class="icon-bar"></span>
</button>
<div class="color-line">
<div class="color color-1"/>
<div class="color color-2"/>
<div class="color color-3"/>
<div class="color color-4"/>
<div class="color color-5"/>
</div>
<div class="navbar-collapse collapse">
<div class="f_toggle_buttons">
<ul class="nav navbar-nav">
<li class="f_company_name hidden-xs">
<a class="o_sub_menu_logo" t-att-href="'/web/?debug' if debug else '/web'">
<img src='/web/binary/company_logo'/>
</a>
</li>
<li id="f_menu_toggle">
<a href="#"><i class="fa fa-bars"/></a>
</li>
<li id="f_user_toggle">
<a href="#"><i class="fa fa-user"/></a>
</li>
<li id="f_apps_search" class="hidden-xs">
<a href="#"><i class="fa fa-search"/></a>
</li>
</ul>
</div>
<div class="f_menu_systray">
<t t-call="web.menu"/>
</div>
</nav>
<div class="o_main">
<div class="o_sub_menu" groups="base.group_user,base.group_portal">
<t t-call="web.menu_secondary"/>
<div class="f_launcher">
<t t-call="web.menu_launcher"/>
</div>
<div class="o_main_content"/>
</div>