diff --git a/theme_kit/__init__.py b/theme_kit/__init__.py index 3ed6cbbe89..92325983cf 100644 --- a/theme_kit/__init__.py +++ b/theme_kit/__init__.py @@ -1,2 +1,2 @@ -# License MIT (https://opensource.org/licenses/MIT). +# License LGPL-3.0 or later (http://www.gnu.org/licenses/lgpl.html). from . import models diff --git a/theme_kit/__manifest__.py b/theme_kit/__manifest__.py index 70353abaea..ac4583d469 100644 --- a/theme_kit/__manifest__.py +++ b/theme_kit/__manifest__.py @@ -1,17 +1,17 @@ # Copyright 2016 Ivan Yelizariev # Copyright 2018 Dinar Gabbasov -# License MIT (https://opensource.org/licenses/MIT). +# License LGPL-3.0 or later (http://www.gnu.org/licenses/lgpl.html). { "name": """Brand kit""", "summary": """Brand your odoo instance in few clicks""", "category": "Debranding", - # "live_test_url": "http://apps.it-projects.info/shop/product/theme-kit?version=11.0", + "live_test_url": "http://apps.it-projects.info/shop/product/theme-kit?version=11.0", "images": ["images/brandkit.png"], "version": "11.0.1.1.2", "application": False, "author": "IT-Projects LLC, Ivan Yelizariev", "website": "https://it-projects.info", - "license": "Other OSI approved licence", # MIT + "license": "GPL-3", "price": 50.00, "currency": "EUR", "depends": ["web_debranding", "web_login_background", "web_widget_color"], diff --git a/theme_kit/data/theme_data.xml b/theme_kit/data/theme_data.xml index 8126bc51d1..76330ce2b3 100644 --- a/theme_kit/data/theme_data.xml +++ b/theme_kit/data/theme_data.xml @@ -1,6 +1,6 @@ + License LGPL-3.0 or later (http://www.gnu.org/licenses/lgpl.html). --> diff --git a/theme_kit/doc/changelog.rst b/theme_kit/doc/changelog.rst index c992b2027d..1f763e8ae3 100644 --- a/theme_kit/doc/changelog.rst +++ b/theme_kit/doc/changelog.rst @@ -1,3 +1,14 @@ +`1.0.4` +------- + +- ADD: added color picker for mandatory fields + +`1.0.3` +------- + +- FIX: compatibility with material backend theme module + + `1.0.2` ------- diff --git a/theme_kit/i18n/es_CR.po b/theme_kit/i18n/es_CR.po index 556030d022..47c6137add 100644 --- a/theme_kit/i18n/es_CR.po +++ b/theme_kit/i18n/es_CR.po @@ -1,7 +1,7 @@ # Translation of Odoo Server. # This file contains the translation of the following modules: # * theme_kit -# +# # Translators: # Randall , 2018 msgid "" @@ -11,12 +11,11 @@ msgstr "" "POT-Creation-Date: 2018-04-30 21:57+0000\n" "PO-Revision-Date: 2018-04-30 21:57+0000\n" "Last-Translator: Randall , 2018\n" -"Language-Team: Spanish (Costa Rica) (https://www.transifex.com/it-projects-" -"llc/teams/76080/es_CR/)\n" -"Language: es_CR\n" +"Language-Team: Spanish (Costa Rica) (https://www.transifex.com/it-projects-llc/teams/76080/es_CR/)\n" "MIME-Version: 1.0\n" "Content-Type: text/plain; charset=UTF-8\n" "Content-Transfer-Encoding: \n" +"Language: es_CR\n" "Plural-Forms: nplurals=2; plural=(n != 1);\n" #. module: theme_kit @@ -43,9 +42,7 @@ msgstr "" #: model:ir.ui.view,arch_db:theme_kit.view_config msgid "" "[System Name] Warning - Warning
\n" -" You can not " -"remove the admin user as it is used internally for resources created by " -"[System Name] (updates, module installation, ...)" +" You can not remove the admin user as it is used internally for resources created by [System Name] (updates, module installation, ...)" msgstr "" #. module: theme_kit @@ -206,6 +203,7 @@ msgstr "" #. module: theme_kit #: model:ir.ui.menu,name:theme_kit.theme_menu +#: model:ir.ui.view,arch_db:theme_kit.theme_view_tree msgid "Color Schemes" msgstr "" diff --git a/theme_kit/i18n/fr.po b/theme_kit/i18n/fr.po index 0228a7ff78..6b710d54a3 100644 --- a/theme_kit/i18n/fr.po +++ b/theme_kit/i18n/fr.po @@ -1,7 +1,7 @@ # Translation of Odoo Server. # This file contains the translation of the following modules: # * theme_kit -# +# # Translators: # Translation Bot , 2018 msgid "" @@ -11,12 +11,11 @@ msgstr "" "POT-Creation-Date: 2018-04-20 23:53+0000\n" "PO-Revision-Date: 2018-04-20 23:53+0000\n" "Last-Translator: Translation Bot , 2018\n" -"Language-Team: French (https://www.transifex.com/it-projects-llc/teams/76080/" -"fr/)\n" -"Language: fr\n" +"Language-Team: French (https://www.transifex.com/it-projects-llc/teams/76080/fr/)\n" "MIME-Version: 1.0\n" "Content-Type: text/plain; charset=UTF-8\n" "Content-Transfer-Encoding: \n" +"Language: fr\n" "Plural-Forms: nplurals=2; plural=(n > 1);\n" #. module: theme_kit @@ -24,16 +23,6 @@ msgstr "" msgid "#inbox - [Page Title]" msgstr "" -#. module: theme_kit -#: model:ir.ui.view,arch_db:theme_kit.view_config -msgid "\"Help\" in Import tool" -msgstr "" - -#. module: theme_kit -#: model:ir.ui.view,arch_db:theme_kit.view_config -msgid "\"How-to\" in paypal" -msgstr "" - #. module: theme_kit #: model:ir.ui.view,arch_db:theme_kit.view_config msgid "[Page Title]" @@ -43,9 +32,7 @@ msgstr "" #: model:ir.ui.view,arch_db:theme_kit.view_config msgid "" "[System Name] Warning - Warning
\n" -" You can not " -"remove the admin user as it is used internally for resources created by " -"[System Name] (updates, module installation, ...)" +" You can not remove the admin user as it is used internally for resources created by [System Name] (updates, module installation, ...)" msgstr "" #. module: theme_kit @@ -114,6 +101,11 @@ msgid "" " " msgstr "" +#. module: theme_kit +#: model:ir.ui.view,arch_db:theme_kit.view_config +msgid "Apply" +msgstr "" + #. module: theme_kit #: model:ir.model.fields,help:theme_kit.field_theme_kit_left_panel_left_panel_bg #: model:ir.model.fields,help:theme_kit.field_theme_kit_left_panel_left_panel_bg_active @@ -171,6 +163,11 @@ msgstr "" msgid "Button color" msgstr "" +#. module: theme_kit +#: model:ir.ui.view,arch_db:theme_kit.view_config +msgid "Cancel" +msgstr "" + #. module: theme_kit #: model:ir.actions.act_window,help:theme_kit.ir_attachment_login_bg_action msgid "Click here to add new Wallpapers." @@ -206,6 +203,7 @@ msgstr "" #. module: theme_kit #: model:ir.ui.menu,name:theme_kit.theme_menu +#: model:ir.ui.view,arch_db:theme_kit.theme_view_tree msgid "Color Schemes" msgstr "" @@ -272,72 +270,72 @@ msgstr "" #. module: theme_kit #: model:ir.model.fields,field_description:theme_kit.field_theme_kit_content_content_bg_active -msgid "Content Bg Active" +msgid "Content bg active" msgstr "" #. module: theme_kit #: model:ir.model.fields,field_description:theme_kit.field_theme_kit_content_content_button_active -msgid "Content Button Active" +msgid "Content button active" msgstr "" #. module: theme_kit #: model:ir.model.fields,field_description:theme_kit.field_theme_kit_content_content_footer_color_active -msgid "Content Footer Color Active" +msgid "Content footer color active" msgstr "" #. module: theme_kit #: model:ir.model.fields,field_description:theme_kit.field_theme_kit_content_content_form_active -msgid "Content Form Active" +msgid "Content form active" msgstr "" #. module: theme_kit #: model:ir.model.fields,field_description:theme_kit.field_theme_kit_content_content_form_link_active -msgid "Content Form Link Active" +msgid "Content form link active" msgstr "" #. module: theme_kit #: model:ir.model.fields,field_description:theme_kit.field_theme_kit_content_content_form_text_active -msgid "Content Form Text Active" +msgid "Content form text active" msgstr "" #. module: theme_kit #: model:ir.model.fields,field_description:theme_kit.field_theme_kit_content_content_form_title_active -msgid "Content Form Title Active" +msgid "Content form title active" msgstr "" #. module: theme_kit #: model:ir.model.fields,field_description:theme_kit.field_theme_kit_content_content_loader_active -msgid "Content Loader Active" +msgid "Content loader active" msgstr "" #. module: theme_kit #: model:ir.model.fields,field_description:theme_kit.field_theme_kit_content_content_loader_text_active -msgid "Content Loader Text Active" +msgid "Content loader text active" msgstr "" #. module: theme_kit #: model:ir.model.fields,field_description:theme_kit.field_theme_kit_content_content_main_menu_font_color_active -msgid "Content Main Menu Font Color Active" +msgid "Content main menu font color active" msgstr "" #. module: theme_kit #: model:ir.model.fields,field_description:theme_kit.field_theme_kit_content_content_statusbar_bg_active -msgid "Content Statusbar Bg Active" +msgid "Content statusbar bg active" msgstr "" #. module: theme_kit #: model:ir.model.fields,field_description:theme_kit.field_theme_kit_content_content_statusbar_element_active -msgid "Content Statusbar Element Active" +msgid "Content statusbar element active" msgstr "" #. module: theme_kit #: model:ir.model.fields,field_description:theme_kit.field_theme_kit_content_content_statusbar_font_color_active -msgid "Content Statusbar Font Color Active" +msgid "Content statusbar font color active" msgstr "" #. module: theme_kit #: model:ir.model.fields,field_description:theme_kit.field_theme_kit_content_content_text_active -msgid "Content Text Active" +msgid "Content text active" msgstr "" #. module: theme_kit @@ -378,11 +376,6 @@ msgstr "" msgid "Dashboard - [Page Title]" msgstr "" -#. module: theme_kit -#: model:ir.ui.view,arch_db:theme_kit.view_config -msgid "Discard" -msgstr "" - #. module: theme_kit #: model:ir.model.fields,field_description:theme_kit.field_theme_kit_config_display_name #: model:ir.model.fields,field_description:theme_kit.field_theme_kit_content_display_name @@ -392,21 +385,6 @@ msgstr "" msgid "Display Name" msgstr "Nom affiché" -#. module: theme_kit -#: model:ir.ui.view,arch_db:theme_kit.view_config -msgid "Documentation" -msgstr "" - -#. module: theme_kit -#: model:ir.model.fields,field_description:theme_kit.field_theme_kit_config_new_documentation_website -msgid "Documentation Website" -msgstr "" - -#. module: theme_kit -#: model:ir.ui.view,arch_db:theme_kit.view_config -msgid "DocumentationWebsite" -msgstr "" - #. module: theme_kit #: model:ir.model.fields,help:theme_kit.field_theme_kit_config_company_logo msgid "" @@ -509,45 +487,45 @@ msgstr "Dernière mise à jour par" msgid "Last Updated on" msgstr "Dernière mise à jour le" +#. module: theme_kit +#: model:ir.ui.view,arch_db:theme_kit.theme_left_panel_view_form +#: model:ir.ui.view,arch_db:theme_kit.theme_view_form +msgid "Left panel" +msgstr "" + #. module: theme_kit #: model:ir.model.fields,field_description:theme_kit.field_theme_kit_left_panel_left_panel_active_item_bg_active -msgid "Left Panel Active Item Bg Active" +msgid "Left panel active item bg active" msgstr "" #. module: theme_kit #: model:ir.model.fields,field_description:theme_kit.field_theme_kit_left_panel_left_panel_active_item_font_active -msgid "Left Panel Active Item Font Active" +msgid "Left panel active item font active" msgstr "" #. module: theme_kit #: model:ir.model.fields,field_description:theme_kit.field_theme_kit_left_panel_left_panel_bg_active -msgid "Left Panel Bg Active" +msgid "Left panel bg active" msgstr "" #. module: theme_kit #: model:ir.model.fields,field_description:theme_kit.field_theme_kit_left_panel_left_panel_hover_item_bg_active -msgid "Left Panel Hover Item Bg Active" +msgid "Left panel hover item bg active" msgstr "" #. module: theme_kit #: model:ir.model.fields,field_description:theme_kit.field_theme_kit_left_panel_left_panel_hover_item_font_active -msgid "Left Panel Hover Item Font Active" +msgid "Left panel hover item font active" msgstr "" #. module: theme_kit #: model:ir.model.fields,field_description:theme_kit.field_theme_kit_left_panel_left_panel_main_menu_active -msgid "Left Panel Main Menu Active" +msgid "Left panel main menu active" msgstr "" #. module: theme_kit #: model:ir.model.fields,field_description:theme_kit.field_theme_kit_left_panel_left_panel_sub_menu_active -msgid "Left Panel Sub Menu Active" -msgstr "" - -#. module: theme_kit -#: model:ir.ui.view,arch_db:theme_kit.theme_left_panel_view_form -#: model:ir.ui.view,arch_db:theme_kit.theme_view_form -msgid "Left panel" +msgid "Left panel sub menu active" msgstr "" #. module: theme_kit @@ -621,40 +599,6 @@ msgstr "" msgid "Page Title is used in Browser Tab name, for example
" msgstr "" -#. module: theme_kit -#: model:ir.model.fields,help:theme_kit.field_theme_kit_config_new_documentation_website -msgid "" -"Replaces links to documentation to custom website e.g.\n" -"* \"Help\" in Import tool\n" -"* \"How-to\" in paypal\n" -"* etc.\n" -msgstr "" - -#. module: theme_kit -#: model:ir.ui.view,arch_db:theme_kit.view_config -msgid "Replaces links to documentation to custom website, for example
" -msgstr "" - -#. module: theme_kit -#: model:ir.ui.view,arch_db:theme_kit.view_config -msgid "Save" -msgstr "" - -#. module: theme_kit -#: model:ir.ui.view,arch_db:theme_kit.view_config -msgid "Set the company favicon of your website" -msgstr "" - -#. module: theme_kit -#: model:ir.ui.view,arch_db:theme_kit.view_config -msgid "Set the company logo of your website" -msgstr "" - -#. module: theme_kit -#: model:ir.ui.view,arch_db:theme_kit.view_config -msgid "Set the theme of your website" -msgstr "" - #. module: theme_kit #: model:ir.model.fields,field_description:theme_kit.field_theme_kit_content_content_statusbar_bg #: model:ir.model.fields,help:theme_kit.field_theme_kit_content_content_statusbar_bg @@ -734,45 +678,45 @@ msgstr "" msgid "These wallpapers are randomly shown on login page" msgstr "" +#. module: theme_kit +#: model:ir.ui.view,arch_db:theme_kit.theme_top_panel_view_form +#: model:ir.ui.view,arch_db:theme_kit.theme_view_form +msgid "Top panel" +msgstr "" + #. module: theme_kit #: model:ir.model.fields,field_description:theme_kit.field_theme_kit_top_panel_top_panel_active_item_bg_active -msgid "Top Panel Active Item Bg Active" +msgid "Top panel active item bg active" msgstr "" #. module: theme_kit #: model:ir.model.fields,field_description:theme_kit.field_theme_kit_top_panel_top_panel_active_item_font_active -msgid "Top Panel Active Item Font Active" +msgid "Top panel active item font active" msgstr "" #. module: theme_kit #: model:ir.model.fields,field_description:theme_kit.field_theme_kit_top_panel_top_panel_bg_active -msgid "Top Panel Bg Active" +msgid "Top panel bg active" msgstr "" #. module: theme_kit #: model:ir.model.fields,field_description:theme_kit.field_theme_kit_top_panel_top_panel_border_active -msgid "Top Panel Border Active" +msgid "Top panel border active" msgstr "" #. module: theme_kit #: model:ir.model.fields,field_description:theme_kit.field_theme_kit_top_panel_top_panel_font_active -msgid "Top Panel Font Active" +msgid "Top panel font active" msgstr "" #. module: theme_kit #: model:ir.model.fields,field_description:theme_kit.field_theme_kit_top_panel_top_panel_hover_item_bg_active -msgid "Top Panel Hover Item Bg Active" +msgid "Top panel hover item bg active" msgstr "" #. module: theme_kit #: model:ir.model.fields,field_description:theme_kit.field_theme_kit_top_panel_top_panel_hover_item_font_active -msgid "Top Panel Hover Item Font Active" -msgstr "" - -#. module: theme_kit -#: model:ir.ui.view,arch_db:theme_kit.theme_top_panel_view_form -#: model:ir.ui.view,arch_db:theme_kit.theme_view_form -msgid "Top panel" +msgid "Top panel hover item font active" msgstr "" #. module: theme_kit @@ -802,6 +746,11 @@ msgstr "" msgid "less" msgstr "" +#. module: theme_kit +#: model:ir.ui.view,arch_db:theme_kit.view_config +msgid "or" +msgstr "ou" + #. module: theme_kit #: model:ir.model.fields,help:theme_kit.field_theme_kit_content_less #: model:ir.model.fields,help:theme_kit.field_theme_kit_left_panel_less @@ -810,11 +759,6 @@ msgstr "" msgid "technical computed field" msgstr "" -#. module: theme_kit -#: model:ir.ui.view,arch_db:theme_kit.view_config -msgid "test test test" -msgstr "" - #. module: theme_kit #: model:ir.model,name:theme_kit.model_theme_kit_config msgid "theme_kit.config" @@ -839,6 +783,3 @@ msgstr "" #: model:ir.model,name:theme_kit.model_theme_kit_top_panel msgid "theme_kit.top_panel" msgstr "" - -#~ msgid "or" -#~ msgstr "ou" diff --git a/theme_kit/i18n/ru.po b/theme_kit/i18n/ru.po index be677c9987..4e6aba667e 100644 --- a/theme_kit/i18n/ru.po +++ b/theme_kit/i18n/ru.po @@ -1,7 +1,7 @@ # Translation of Odoo Server. # This file contains the translation of the following modules: # * theme_kit -# +# # Translators: # Dinar , 2017 msgid "" @@ -11,31 +11,18 @@ msgstr "" "POT-Creation-Date: 2017-11-22 11:27+0000\n" "PO-Revision-Date: 2017-11-22 11:27+0000\n" "Last-Translator: Dinar , 2017\n" -"Language-Team: Russian (https://www.transifex.com/it-projects-llc/" -"teams/76080/ru/)\n" -"Language: ru\n" +"Language-Team: Russian (https://www.transifex.com/it-projects-llc/teams/76080/ru/)\n" "MIME-Version: 1.0\n" "Content-Type: text/plain; charset=UTF-8\n" "Content-Transfer-Encoding: \n" -"Plural-Forms: nplurals=4; plural=(n%10==1 && n%100!=11 ? 0 : n%10>=2 && n" -"%10<=4 && (n%100<12 || n%100>14) ? 1 : n%10==0 || (n%10>=5 && n%10<=9) || (n" -"%100>=11 && n%100<=14)? 2 : 3);\n" +"Language: ru\n" +"Plural-Forms: nplurals=4; plural=(n%10==1 && n%100!=11 ? 0 : n%10>=2 && n%10<=4 && (n%100<12 || n%100>14) ? 1 : n%10==0 || (n%10>=5 && n%10<=9) || (n%100>=11 && n%100<=14)? 2 : 3);\n" #. module: theme_kit #: model:ir.ui.view,arch_db:theme_kit.view_config msgid "#inbox - [Page Title]" msgstr "" -#. module: theme_kit -#: model:ir.ui.view,arch_db:theme_kit.view_config -msgid "\"Help\" in Import tool" -msgstr "" - -#. module: theme_kit -#: model:ir.ui.view,arch_db:theme_kit.view_config -msgid "\"How-to\" in paypal" -msgstr "" - #. module: theme_kit #: model:ir.ui.view,arch_db:theme_kit.view_config msgid "[Page Title]" @@ -45,9 +32,7 @@ msgstr "" #: model:ir.ui.view,arch_db:theme_kit.view_config msgid "" "[System Name] Warning - Warning
\n" -" You can not " -"remove the admin user as it is used internally for resources created by " -"[System Name] (updates, module installation, ...)" +" You can not remove the admin user as it is used internally for resources created by [System Name] (updates, module installation, ...)" msgstr "" #. module: theme_kit @@ -116,6 +101,11 @@ msgid "" " " msgstr "" +#. module: theme_kit +#: model:ir.ui.view,arch_db:theme_kit.view_config +msgid "Apply" +msgstr "" + #. module: theme_kit #: model:ir.model.fields,help:theme_kit.field_theme_kit_left_panel_left_panel_bg #: model:ir.model.fields,help:theme_kit.field_theme_kit_left_panel_left_panel_bg_active @@ -173,6 +163,11 @@ msgstr "" msgid "Button color" msgstr "" +#. module: theme_kit +#: model:ir.ui.view,arch_db:theme_kit.view_config +msgid "Cancel" +msgstr "" + #. module: theme_kit #: model:ir.actions.act_window,help:theme_kit.ir_attachment_login_bg_action msgid "Click here to add new Wallpapers." @@ -208,6 +203,7 @@ msgstr "" #. module: theme_kit #: model:ir.ui.menu,name:theme_kit.theme_menu +#: model:ir.ui.view,arch_db:theme_kit.theme_view_tree msgid "Color Schemes" msgstr "" @@ -274,72 +270,72 @@ msgstr "" #. module: theme_kit #: model:ir.model.fields,field_description:theme_kit.field_theme_kit_content_content_bg_active -msgid "Content Bg Active" +msgid "Content bg active" msgstr "" #. module: theme_kit #: model:ir.model.fields,field_description:theme_kit.field_theme_kit_content_content_button_active -msgid "Content Button Active" +msgid "Content button active" msgstr "" #. module: theme_kit #: model:ir.model.fields,field_description:theme_kit.field_theme_kit_content_content_footer_color_active -msgid "Content Footer Color Active" +msgid "Content footer color active" msgstr "" #. module: theme_kit #: model:ir.model.fields,field_description:theme_kit.field_theme_kit_content_content_form_active -msgid "Content Form Active" +msgid "Content form active" msgstr "" #. module: theme_kit #: model:ir.model.fields,field_description:theme_kit.field_theme_kit_content_content_form_link_active -msgid "Content Form Link Active" +msgid "Content form link active" msgstr "" #. module: theme_kit #: model:ir.model.fields,field_description:theme_kit.field_theme_kit_content_content_form_text_active -msgid "Content Form Text Active" +msgid "Content form text active" msgstr "" #. module: theme_kit #: model:ir.model.fields,field_description:theme_kit.field_theme_kit_content_content_form_title_active -msgid "Content Form Title Active" +msgid "Content form title active" msgstr "" #. module: theme_kit #: model:ir.model.fields,field_description:theme_kit.field_theme_kit_content_content_loader_active -msgid "Content Loader Active" +msgid "Content loader active" msgstr "" #. module: theme_kit #: model:ir.model.fields,field_description:theme_kit.field_theme_kit_content_content_loader_text_active -msgid "Content Loader Text Active" +msgid "Content loader text active" msgstr "" #. module: theme_kit #: model:ir.model.fields,field_description:theme_kit.field_theme_kit_content_content_main_menu_font_color_active -msgid "Content Main Menu Font Color Active" +msgid "Content main menu font color active" msgstr "" #. module: theme_kit #: model:ir.model.fields,field_description:theme_kit.field_theme_kit_content_content_statusbar_bg_active -msgid "Content Statusbar Bg Active" +msgid "Content statusbar bg active" msgstr "" #. module: theme_kit #: model:ir.model.fields,field_description:theme_kit.field_theme_kit_content_content_statusbar_element_active -msgid "Content Statusbar Element Active" +msgid "Content statusbar element active" msgstr "" #. module: theme_kit #: model:ir.model.fields,field_description:theme_kit.field_theme_kit_content_content_statusbar_font_color_active -msgid "Content Statusbar Font Color Active" +msgid "Content statusbar font color active" msgstr "" #. module: theme_kit #: model:ir.model.fields,field_description:theme_kit.field_theme_kit_content_content_text_active -msgid "Content Text Active" +msgid "Content text active" msgstr "" #. module: theme_kit @@ -380,11 +376,6 @@ msgstr "" msgid "Dashboard - [Page Title]" msgstr "" -#. module: theme_kit -#: model:ir.ui.view,arch_db:theme_kit.view_config -msgid "Discard" -msgstr "" - #. module: theme_kit #: model:ir.model.fields,field_description:theme_kit.field_theme_kit_config_display_name #: model:ir.model.fields,field_description:theme_kit.field_theme_kit_content_display_name @@ -394,21 +385,6 @@ msgstr "" msgid "Display Name" msgstr "Отображаемое имя" -#. module: theme_kit -#: model:ir.ui.view,arch_db:theme_kit.view_config -msgid "Documentation" -msgstr "" - -#. module: theme_kit -#: model:ir.model.fields,field_description:theme_kit.field_theme_kit_config_new_documentation_website -msgid "Documentation Website" -msgstr "" - -#. module: theme_kit -#: model:ir.ui.view,arch_db:theme_kit.view_config -msgid "DocumentationWebsite" -msgstr "" - #. module: theme_kit #: model:ir.model.fields,help:theme_kit.field_theme_kit_config_company_logo msgid "" @@ -511,45 +487,45 @@ msgstr "" msgid "Last Updated on" msgstr "" +#. module: theme_kit +#: model:ir.ui.view,arch_db:theme_kit.theme_left_panel_view_form +#: model:ir.ui.view,arch_db:theme_kit.theme_view_form +msgid "Left panel" +msgstr "" + #. module: theme_kit #: model:ir.model.fields,field_description:theme_kit.field_theme_kit_left_panel_left_panel_active_item_bg_active -msgid "Left Panel Active Item Bg Active" +msgid "Left panel active item bg active" msgstr "" #. module: theme_kit #: model:ir.model.fields,field_description:theme_kit.field_theme_kit_left_panel_left_panel_active_item_font_active -msgid "Left Panel Active Item Font Active" +msgid "Left panel active item font active" msgstr "" #. module: theme_kit #: model:ir.model.fields,field_description:theme_kit.field_theme_kit_left_panel_left_panel_bg_active -msgid "Left Panel Bg Active" +msgid "Left panel bg active" msgstr "" #. module: theme_kit #: model:ir.model.fields,field_description:theme_kit.field_theme_kit_left_panel_left_panel_hover_item_bg_active -msgid "Left Panel Hover Item Bg Active" +msgid "Left panel hover item bg active" msgstr "" #. module: theme_kit #: model:ir.model.fields,field_description:theme_kit.field_theme_kit_left_panel_left_panel_hover_item_font_active -msgid "Left Panel Hover Item Font Active" +msgid "Left panel hover item font active" msgstr "" #. module: theme_kit #: model:ir.model.fields,field_description:theme_kit.field_theme_kit_left_panel_left_panel_main_menu_active -msgid "Left Panel Main Menu Active" +msgid "Left panel main menu active" msgstr "" #. module: theme_kit #: model:ir.model.fields,field_description:theme_kit.field_theme_kit_left_panel_left_panel_sub_menu_active -msgid "Left Panel Sub Menu Active" -msgstr "" - -#. module: theme_kit -#: model:ir.ui.view,arch_db:theme_kit.theme_left_panel_view_form -#: model:ir.ui.view,arch_db:theme_kit.theme_view_form -msgid "Left panel" +msgid "Left panel sub menu active" msgstr "" #. module: theme_kit @@ -623,40 +599,6 @@ msgstr "" msgid "Page Title is used in Browser Tab name, for example
" msgstr "" -#. module: theme_kit -#: model:ir.model.fields,help:theme_kit.field_theme_kit_config_new_documentation_website -msgid "" -"Replaces links to documentation to custom website e.g.\n" -"* \"Help\" in Import tool\n" -"* \"How-to\" in paypal\n" -"* etc.\n" -msgstr "" - -#. module: theme_kit -#: model:ir.ui.view,arch_db:theme_kit.view_config -msgid "Replaces links to documentation to custom website, for example
" -msgstr "" - -#. module: theme_kit -#: model:ir.ui.view,arch_db:theme_kit.view_config -msgid "Save" -msgstr "" - -#. module: theme_kit -#: model:ir.ui.view,arch_db:theme_kit.view_config -msgid "Set the company favicon of your website" -msgstr "" - -#. module: theme_kit -#: model:ir.ui.view,arch_db:theme_kit.view_config -msgid "Set the company logo of your website" -msgstr "" - -#. module: theme_kit -#: model:ir.ui.view,arch_db:theme_kit.view_config -msgid "Set the theme of your website" -msgstr "" - #. module: theme_kit #: model:ir.model.fields,field_description:theme_kit.field_theme_kit_content_content_statusbar_bg #: model:ir.model.fields,help:theme_kit.field_theme_kit_content_content_statusbar_bg @@ -736,45 +678,45 @@ msgstr "" msgid "These wallpapers are randomly shown on login page" msgstr "" +#. module: theme_kit +#: model:ir.ui.view,arch_db:theme_kit.theme_top_panel_view_form +#: model:ir.ui.view,arch_db:theme_kit.theme_view_form +msgid "Top panel" +msgstr "" + #. module: theme_kit #: model:ir.model.fields,field_description:theme_kit.field_theme_kit_top_panel_top_panel_active_item_bg_active -msgid "Top Panel Active Item Bg Active" +msgid "Top panel active item bg active" msgstr "" #. module: theme_kit #: model:ir.model.fields,field_description:theme_kit.field_theme_kit_top_panel_top_panel_active_item_font_active -msgid "Top Panel Active Item Font Active" +msgid "Top panel active item font active" msgstr "" #. module: theme_kit #: model:ir.model.fields,field_description:theme_kit.field_theme_kit_top_panel_top_panel_bg_active -msgid "Top Panel Bg Active" +msgid "Top panel bg active" msgstr "" #. module: theme_kit #: model:ir.model.fields,field_description:theme_kit.field_theme_kit_top_panel_top_panel_border_active -msgid "Top Panel Border Active" +msgid "Top panel border active" msgstr "" #. module: theme_kit #: model:ir.model.fields,field_description:theme_kit.field_theme_kit_top_panel_top_panel_font_active -msgid "Top Panel Font Active" +msgid "Top panel font active" msgstr "" #. module: theme_kit #: model:ir.model.fields,field_description:theme_kit.field_theme_kit_top_panel_top_panel_hover_item_bg_active -msgid "Top Panel Hover Item Bg Active" +msgid "Top panel hover item bg active" msgstr "" #. module: theme_kit #: model:ir.model.fields,field_description:theme_kit.field_theme_kit_top_panel_top_panel_hover_item_font_active -msgid "Top Panel Hover Item Font Active" -msgstr "" - -#. module: theme_kit -#: model:ir.ui.view,arch_db:theme_kit.theme_top_panel_view_form -#: model:ir.ui.view,arch_db:theme_kit.theme_view_form -msgid "Top panel" +msgid "Top panel hover item font active" msgstr "" #. module: theme_kit @@ -804,6 +746,11 @@ msgstr "" msgid "less" msgstr "" +#. module: theme_kit +#: model:ir.ui.view,arch_db:theme_kit.view_config +msgid "or" +msgstr "" + #. module: theme_kit #: model:ir.model.fields,help:theme_kit.field_theme_kit_content_less #: model:ir.model.fields,help:theme_kit.field_theme_kit_left_panel_less @@ -812,11 +759,6 @@ msgstr "" msgid "technical computed field" msgstr "" -#. module: theme_kit -#: model:ir.ui.view,arch_db:theme_kit.view_config -msgid "test test test" -msgstr "" - #. module: theme_kit #: model:ir.model,name:theme_kit.model_theme_kit_config msgid "theme_kit.config" diff --git a/theme_kit/i18n/sl.po b/theme_kit/i18n/sl.po index 543a776c22..d4b2a031a2 100644 --- a/theme_kit/i18n/sl.po +++ b/theme_kit/i18n/sl.po @@ -1,7 +1,7 @@ # Translation of Odoo Server. # This file contains the translation of the following modules: # * theme_kit -# +# # Translators: # Translation Bot , 2018 msgid "" @@ -11,14 +11,12 @@ msgstr "" "POT-Creation-Date: 2018-04-17 16:30+0000\n" "PO-Revision-Date: 2018-04-17 16:30+0000\n" "Last-Translator: Translation Bot , 2018\n" -"Language-Team: Slovenian (https://www.transifex.com/it-projects-llc/" -"teams/76080/sl/)\n" -"Language: sl\n" +"Language-Team: Slovenian (https://www.transifex.com/it-projects-llc/teams/76080/sl/)\n" "MIME-Version: 1.0\n" "Content-Type: text/plain; charset=UTF-8\n" "Content-Transfer-Encoding: \n" -"Plural-Forms: nplurals=4; plural=(n%100==1 ? 0 : n%100==2 ? 1 : n%100==3 || n" -"%100==4 ? 2 : 3);\n" +"Language: sl\n" +"Plural-Forms: nplurals=4; plural=(n%100==1 ? 0 : n%100==2 ? 1 : n%100==3 || n%100==4 ? 2 : 3);\n" #. module: theme_kit #: model:ir.ui.view,arch_db:theme_kit.view_config @@ -44,9 +42,7 @@ msgstr "" #: model:ir.ui.view,arch_db:theme_kit.view_config msgid "" "[System Name] Warning - Warning
\n" -" You can not " -"remove the admin user as it is used internally for resources created by " -"[System Name] (updates, module installation, ...)" +" You can not remove the admin user as it is used internally for resources created by [System Name] (updates, module installation, ...)" msgstr "" #. module: theme_kit @@ -207,6 +203,7 @@ msgstr "" #. module: theme_kit #: model:ir.ui.menu,name:theme_kit.theme_menu +#: model:ir.ui.view,arch_db:theme_kit.theme_view_tree msgid "Color Schemes" msgstr "" diff --git a/theme_kit/models/__init__.py b/theme_kit/models/__init__.py index f162f3c0ca..6d9c006895 100644 --- a/theme_kit/models/__init__.py +++ b/theme_kit/models/__init__.py @@ -1,3 +1,3 @@ -# License MIT (https://opensource.org/licenses/MIT). +# License LGPL-3.0 or later (http://www.gnu.org/licenses/lgpl.html). from . import theme from . import res_config diff --git a/theme_kit/models/__pycache__/__init__.cpython-36.pyc b/theme_kit/models/__pycache__/__init__.cpython-36.pyc new file mode 100644 index 0000000000..6a4fe2b0cb Binary files /dev/null and b/theme_kit/models/__pycache__/__init__.cpython-36.pyc differ diff --git a/theme_kit/models/__pycache__/res_config.cpython-36.pyc b/theme_kit/models/__pycache__/res_config.cpython-36.pyc new file mode 100644 index 0000000000..b933689d26 Binary files /dev/null and b/theme_kit/models/__pycache__/res_config.cpython-36.pyc differ diff --git a/theme_kit/models/__pycache__/theme.cpython-36.pyc b/theme_kit/models/__pycache__/theme.cpython-36.pyc new file mode 100644 index 0000000000..c021b76bed Binary files /dev/null and b/theme_kit/models/__pycache__/theme.cpython-36.pyc differ diff --git a/theme_kit/models/res_config.py b/theme_kit/models/res_config.py index 0aad3024dd..8135527f8f 100644 --- a/theme_kit/models/res_config.py +++ b/theme_kit/models/res_config.py @@ -1,10 +1,10 @@ # Copyright 2016 Ivan Yelizariev # Copyright 2016,2018 Dinar Gabbasov -# License MIT (https://opensource.org/licenses/MIT). +# License LGPL-3.0 or later (http://www.gnu.org/licenses/lgpl.html). import hashlib -from odoo import api, fields, models +from openerp import api, fields, models CUSTOM_CSS_ARCH = """ diff --git a/theme_kit/models/theme.py b/theme_kit/models/theme.py index 74468e3a5d..7a9f1fb948 100644 --- a/theme_kit/models/theme.py +++ b/theme_kit/models/theme.py @@ -1,6 +1,6 @@ # Copyright 2016 Ivan Yelizariev # Copyright 2016,2018 Dinar Gabbasov -# License MIT (https://opensource.org/licenses/MIT). +# License LGPL-3.0 or later (http://www.gnu.org/licenses/lgpl.html). from odoo import api, fields, models @@ -104,6 +104,14 @@ class ThemeTopPanel(models.Model): default=False, help="Active item Background color for Top Panel" ) + top_panel_active_subitem_bg = fields.Char( + "Active submenu item Background color", + help="Active item Background color for Top Panel", + ) + top_panel_active_subitem_bg_active = fields.Boolean( + default=False, help="Active submenu item Background color for Top Panel" + ) + top_panel_hover_item_font = fields.Char( "Hover item Font color", help="Hover item Font color for Top Panel" ) @@ -117,11 +125,70 @@ class ThemeTopPanel(models.Model): top_panel_hover_item_bg_active = fields.Boolean( default=False, help="Hover item Background color for Top Panel" ) + top_panel_hover_subitem_bg = fields.Char( + "Hover submenu item Background color", help="Hover item Background color for Top Panel" + ) + top_panel_hover_subitem_bg_active = fields.Boolean( + default=False, help="Hover submenu item Background color for Top Panel" + ) + + # Compatibility theme_kit and material backend theme modules + left_panel_main_menu = fields.Char( + "Main Menu Font color", help="Main Menu Font colo for Left Menu Bar" + ) + left_panel_main_menu_active = fields.Boolean( + default=False, help="Main Menu Font colo for Left Menu Bar" + ) + left_panel_sub_menu = fields.Char( + "Sub Menu Font color", help="Sub Menu Font colo for Left Menu Bar" + ) + left_panel_sub_menu_active = fields.Boolean( + default=False, help="Sub Menu Font colo for Left Menu Bar" + ) less = fields.Text("less", help="technical computed field", compute="_compute_less") + backend_theme_installed = fields.Boolean(compute="_compute_backend_theme_installed") + + def _compute_backend_theme_installed(self): + self.backend_theme_installed = ( + True + if self.env["ir.module.module"] + .search([("name", "=", "backend_theme_v11")]) + .state + == "installed" + else False + ) + + # @api.multi + # def write(self, vals): + # res = super(ThemeTopPanel, self).write(vals) + # if not vals.get("top_panel_bg_active", "Not found"): + # self.top_panel_bg = "" + # if not vals.get("top_panel_border_active", "Not found"): + # self.top_panel_border = "" + # if not vals.get("top_panel_font_active", "Not found"): + # self.top_panel_font = "" + # if not vals.get("top_panel_active_item_font_active", "Not found"): + # self.top_panel_active_item_font = "" + # if not vals.get("top_panel_active_item_bg_active", "Not found"): + # self.top_panel_active_item_bg = "" + # if not vals.get("top_panel_hover_item_font_active", "Not found"): + # self.top_panel_hover_item_font = "" + # if not vals.get("top_panel_hover_item_bg_active", "Not found"): + # self.top_panel_hover_item_bg = "" + # if not vals.get("top_panel_hover_subitem_bg_active", "Not found"): + # self.top_panel_hover_subitem_bg = "" + # if not vals.get("left_panel_main_menu_active", "Not found"): + # self.left_panel_main_menu = "" + # if not vals.get("left_panel_sub_menu_active", "Not found"): + # self.top_panel_hover_item_bg = "" + # if not vals.get("top_panel_active_subitem_bg_active", "Not found"): + # self.top_panel_active_subitem_bg = "" + @api.multi def _compute_less(self): + # import wdb;wdb.set_trace() for r in self: code = "" # double {{ will be formated as single { @@ -156,34 +223,52 @@ def _compute_less(self): }} """ ) - - if self.top_panel_border_active: + # Compatibility theme_kit and material backend theme modules code = ( code - + """.o_main_navbar{{ - border-color: {theme.top_panel_border}; - }} - #oe_main_menu_navbar{{ - border-color: {theme.top_panel_border}; - }} - .o_control_panel {{ - border-bottom-color: {theme.top_panel_border}!important; - }} - .o_form_statusbar .o_arrow_button{{ - border-color: lighten({theme.top_panel_border}, 40%)!important; - }} - .o_form_statusbar .o_arrow_button:before{{ - border-left-color: lighten({theme.top_panel_border}, 40%)!important; - }} - .o_list_view thead {{ - color: {theme.top_panel_border}; - }} - .o_list_view thead > tr > th {{ - border-color: {theme.top_panel_border}; + + """nav.navbar.navbar-default.main-nav {{ + background-color: {theme.top_panel_bg}!important }} """ ) - if self.top_panel_font_active: + + if self.top_panel_border_active: + if not self.backend_theme_installed: + code = ( + code + + """.o_main_navbar{{ + border-color: {theme.top_panel_border}; + }} + #oe_main_menu_navbar{{ + border-color: {theme.top_panel_border}; + }} + .o_control_panel {{ + border-bottom-color: {theme.top_panel_border}!important; + }} + .o_form_statusbar .o_arrow_button{{ + border-color: lighten({theme.top_panel_border}, 40%)!important; + }} + .o_form_statusbar .o_arrow_button:before{{ + border-left-color: lighten({theme.top_panel_border}, 40%)!important; + }} + .o_list_view thead {{ + color: {theme.top_panel_border}; + }} + .o_list_view thead > tr > th {{ + border-color: {theme.top_panel_border}; + }} + """ + ) + else: + # Compatibility theme_kit and material backend theme modules + code = ( + code + + """header {{ + border-bottom: 1px solid {theme.top_panel_border} !important; + }} + """ + ) + if self.top_panel_font_active and not self.backend_theme_installed: code = ( code + """.o_main_navbar > ul > li > a {{ @@ -243,6 +328,16 @@ def _compute_less(self): code + """.navbar-nav .active a{{ background-color: {theme.top_panel_active_item_bg}!important; + }} + #odooMenuBarNav > div > div.o_sub_menu_content > ul > li > a.active{{ + background-color: {theme.top_panel_active_item_bg}!important; + }}""" + ) + if self.top_panel_active_subitem_bg_active: + code = ( + code + + """#odooMenuBarNav > div > div.o_sub_menu_content > ul > li > ul > li.active > a{{ + background-color: {theme.top_panel_active_subitem_bg}!important; }}""" ) if self.top_panel_hover_item_font_active: @@ -281,35 +376,44 @@ def _compute_less(self): """ ) if self.top_panel_hover_item_bg_active: + # Compatibility theme_kit and material backend theme modules code = ( code - + """.o_main_navbar > ul > li > a:hover{{ - background-color: {theme.top_panel_hover_item_bg}!important; + + """#odooMenuBarNav > div > div.o_sub_menu_content > ul > li > a:hover{{ + background-color: {theme.top_panel_hover_item_bg} !important; }} - .o_main_navbar > ul > li > a:focus{{ - background-color: {theme.top_panel_hover_item_bg}!important; - }} - .navbar-nav li a:hover{{ - background-color: {theme.top_panel_hover_item_bg}!important; - }} - .navbar-nav li a:focus{{ - background-color: {theme.top_panel_hover_item_bg}!important; + #odooMenuBarNav > div > div.o_sub_menu_content > ul > li > a:focus{{ + background-color: {theme.top_panel_hover_item_bg} !important; }} - .o_main_navbar > .o_menu_toggle:hover{{ - background-color: {theme.top_panel_hover_item_bg}!important; - }} - .o_main_navbar > .o_menu_toggle:focus{{ - background-color: {theme.top_panel_hover_item_bg}!important; + """ + ) + if self.top_panel_hover_subitem_bg_active: + code = ( + code + + """#odooMenuBarNav > div > div.o_sub_menu_content > ul > li > ul > li > a:hover {{ + background: {theme.top_panel_hover_subitem_bg} !important; }} - .open .dropdown-menu > li a:hover {{ - background-color: {theme.top_panel_hover_item_bg}!important; + """ + ) + # Compatibility theme_kit and material backend theme modules + if self.left_panel_main_menu_active: + code = ( + code + + """ul.oe_secondary_menu > li > a{{ + color: {theme.left_panel_main_menu}!important; }} - .open .dropdown-menu > li a:focus {{ - background-color: {theme.top_panel_hover_item_bg}!important; + """ + ) + # Compatibility theme_kit and material backend theme modules + if self.left_panel_sub_menu_active: + code = ( + code + + """ul.oe_secondary_menu > li > ul > li.dropdown-header{{ + color: {theme.left_panel_sub_menu}!important; }} """ ) - code = code.format(theme=r) + code = code.format(theme=r,) self.less = code @@ -369,10 +473,62 @@ class ThemeLeftPanel(models.Model): default=False, help="Hover item Background color for Left Menu Bar" ) + left_panel_right_border = fields.Char( + "Right border color", help="Right border color for Left Menu Bar" + ) + left_panel_right_border_active = fields.Boolean( + default=False, help="Right border color for Left Menu Bar" + ) + less = fields.Text("less", help="technical computed field", compute="_compute_less") + backend_theme_installed = fields.Boolean(compute="_compute_backend_theme_installed") + + def _compute_backend_theme_installed(self): + self.backend_theme_installed = ( + True + if self.env["ir.module.module"] + .search([("name", "=", "backend_theme_v11")]) + .state + == "installed" + else False + ) + + top_panel_font = fields.Char("Font color", help="Font color for Top Panel") + top_panel_font_active = fields.Boolean( + default=False, help="Font color for Top Panel" + ) + + # @api.multi + # def write(self, vals): + # res = super(ThemeLeftPanel, self).write(vals) + # if not vals.get("left_panel_bg_active", "Not found"): + # self.left_panel_bg = "" + # if not vals.get("left_panel_sub_menu_active", "Not found"): + # self.left_panel_sub_menu = "" + # if not vals.get("left_panel_main_menu_active", "Not found"): + # self.left_panel_main_menu = "" + # if not vals.get("left_panel_active_item_font_active", "Not found"): + # self.left_panel_active_item_font = "" + # if not vals.get("left_panel_active_item_bg_active", "Not found"): + # self.left_panel_active_item_bg = "" + # if not vals.get("left_panel_hover_item_font_active", "Not found"): + # self.left_panel_hover_item_font = "" + # if not vals.get("left_panel_hover_item_bg_active", "Not found"): + # self.left_panel_hover_item_bg = "" + # if not vals.get("left_panel_right_border_active", "Not found"): + # self.left_panel_right_border = "" + @api.multi def _compute_less(self): + self.backend_theme_installed = ( + True + if self.env["ir.module.module"] + .search([("name", "=", "backend_theme_v11")]) + .state + == "installed" + else False + ) for r in self: # double {{ will be formated as single { code = "" @@ -407,7 +563,15 @@ def _compute_less(self): }} """ ) - if self.left_panel_main_menu_active: + # Compatibility theme_kit and material backend theme modules + code = ( + code + + """.app-sidebar-panel {{ + background-color: {theme.left_panel_bg}!important + }} + """ + ) + if self.left_panel_main_menu_active and not self.backend_theme_installed: code = ( code + """.o_sub_menu .oe_secondary_menu_section{{ @@ -436,7 +600,7 @@ def _compute_less(self): }} """ ) - if self.left_panel_sub_menu_active: + if self.left_panel_sub_menu_active and not self.backend_theme_installed: code = ( code + """.o_sub_menu .oe_secondary_submenu .oe_menu_text{{ @@ -454,56 +618,101 @@ def _compute_less(self): """ ) if self.left_panel_active_item_font_active: - code = ( - code - + """.o_sub_menu .oe_secondary_submenu .active .oe_menu_text{{ - color: {theme.left_panel_active_item_font}!important; - }} - .o_sub_menu .oe_secondary_submenu a:focus .oe_menu_text{{ - color: {theme.left_panel_active_item_font}!important; - }} - .o_mail_chat .o_mail_chat_sidebar .o_mail_chat_channel_item.o_active {{ - color: {theme.left_panel_active_item_font}!important; - }} - """ - ) + if not self.backend_theme_installed: + code = ( + code + + """.o_sub_menu .oe_secondary_submenu .active .oe_menu_text{{ + color: {theme.left_panel_active_item_font}!important; + }} + .o_sub_menu .oe_secondary_submenu a:focus .oe_menu_text{{ + color: {theme.left_panel_active_item_font}!important; + }} + .o_mail_chat .o_mail_chat_sidebar .o_mail_chat_channel_item.o_active {{ + color: {theme.left_panel_active_item_font}!important; + }} + """ + ) + else: + # Compatibility theme_kit and material backend theme modules + code = ( + code + + """#sidebar > li > a.active{{ + color: {theme.left_panel_active_item_font}!important; + }} + """ + ) if self.left_panel_active_item_bg_active: code = ( code - + """.o_sub_menu .oe_secondary_submenu .active a{{ + + """.o_mail_chat .o_mail_chat_sidebar .o_mail_chat_channel_item.o_active {{ background-color: {theme.left_panel_active_item_bg}!important; }} - .o_sub_menu .oe_secondary_submenu a:focus{{ - background-color: {theme.left_panel_active_item_bg}!important; - }} - .o_mail_chat .o_mail_chat_sidebar .o_mail_chat_channel_item.o_active {{ + #sidebar > li > a.active{{ background-color: {theme.left_panel_active_item_bg}!important; }} """ ) if self.left_panel_hover_item_font_active: + if not self.backend_theme_installed: + code = ( + code + + """.o_sub_menu .oe_secondary_submenu a:hover .oe_menu_text{{ + color: {theme.left_panel_hover_item_font}!important; + }} + .o_mail_chat .o_mail_chat_sidebar .o_mail_chat_channel_item:hover {{ + color: {theme.left_panel_hover_item_font}!important; + }} + """ + ) + else: + # Compatibility theme_kit and material backend theme modules + code = ( + code + + """a.nav-link:hover {{ + color: {theme.left_panel_hover_item_font}!important; + }} + """ + ) + if self.left_panel_hover_item_bg_active: + if not self.backend_theme_installed: + code = ( + code + + """.o_sub_menu .oe_secondary_submenu a:hover{{ + background-color: {theme.left_panel_hover_item_bg}!important; + }} + .o_mail_chat .o_mail_chat_sidebar .o_mail_chat_channel_item:hover {{ + background-color: {theme.left_panel_hover_item_bg}!important; + }} + """ + ) + else: + # Compatibility theme_kit and material backend theme modules + code = ( + code + + """a.nav-link:hover {{ + background-color: {theme.left_panel_hover_item_bg}!important; + }} + """ + ) + if self.left_panel_right_border_active: code = ( code - + """.o_sub_menu .oe_secondary_submenu a:hover .oe_menu_text{{ - color: {theme.left_panel_hover_item_font}!important; - }} - .o_mail_chat .o_mail_chat_sidebar .o_mail_chat_channel_item:hover {{ - color: {theme.left_panel_hover_item_font}!important; - }} - """ + + """#app-sidebar{{ + border: 1px solid {theme.left_panel_right_border}; + border-top: 0; + border-bottom: 0; + border-left: 0; + }}""" ) - if self.left_panel_hover_item_bg_active: + if self.top_panel_font_active: code = ( code - + """.o_sub_menu .oe_secondary_submenu a:hover{{ - background-color: {theme.left_panel_hover_item_bg}!important; - }} - .o_mail_chat .o_mail_chat_sidebar .o_mail_chat_channel_item:hover {{ - background-color: {theme.left_panel_hover_item_bg}!important; + + """#sidebar > li > a{{ + color: {theme.top_panel_font}!important }} """ ) - code = code.format(theme=r) + code = code.format(theme=r,) self.less = code @@ -575,8 +784,69 @@ class ThemeContent(models.Model): content_footer_color_active = fields.Boolean(default=False, help="Footer color") less = fields.Text("less", help="technical computed field", compute="_compute_less") + content_required_field_back_color = fields.Char( + "Mandatory field background color", help="Mandatory field background color" + ) + content_required_field_back_color_active = fields.Boolean( + default=False, help="Mandatory field background color" + ) + + backend_theme_installed = fields.Boolean(compute="_compute_backend_theme_installed") + + def _compute_backend_theme_installed(self): + self.backend_theme_installed = ( + True + if self.env["ir.module.module"] + .search([("name", "=", "backend_theme_v11")]) + .state + == "installed" + else False + ) + + # @api.multi + # def write(self, vals): + # res = super(ThemeContent, self).write(vals) + # if not vals.get("content_bg_active", "Not found"): + # self.content_bg = "" + # if not vals.get("content_button_active", "Not found"): + # self.content_button = "" + # if not vals.get("content_form_active", "Not found"): + # self.content_form = "" + # if not vals.get("content_form_text_active", "Not found"): + # self.content_form_text = "" + # if not vals.get("content_form_title_active", "Not found"): + # self.content_form_title = "" + # if not vals.get("content_text_active", "Not found"): + # self.content_text = "" + # if not vals.get("content_form_link_active", "Not found"): + # self.content_form_link = "" + # if not vals.get("content_loader_active", "Not found"): + # self.content_loader = "" + # if not vals.get("content_loader_text_active", "Not found"): + # self.content_loader_text = "" + # if not vals.get("content_statusbar_bg_active", "Not found"): + # self.content_statusbar_bg = "" + # if not vals.get("content_statusbar_element_active", "Not found"): + # self.content_statusbar_element = "" + # if not vals.get("content_statusbar_font_color_active", "Not found"): + # self.content_statusbar_font_color = "" + # if not vals.get("content_main_menu_font_color_active", "Not found"): + # self.content_main_menu_font_color = "" + # if not vals.get("content_footer_color_active", "Not found"): + # self.content_footer_color = "" + # if not vals.get("content_required_field_back_color_active", "Not found"): + # self.content_required_field_back_color = "" + @api.multi def _compute_less(self): + self.backend_theme_installed = ( + True + if self.env["ir.module.module"] + .search([("name", "=", "backend_theme_v11")]) + .state + == "installed" + else False + ) for r in self: code = "" if self.content_bg_active: @@ -913,6 +1183,14 @@ def _compute_less(self): }} """ ) + if self.content_required_field_back_color_active: + code = ( + code + + """.o_field_char.o_field_widget.o_input.o_required_modifier{{ + background-color: {theme.content_required_field_back_color}!important + }} + """ + ) - code = code.format(theme=r) + code = code.format(theme=r,) self.less = code diff --git a/theme_kit/static/js/theme_kit.js b/theme_kit/static/js/theme_kit.js new file mode 100644 index 0000000000..704141d4e8 --- /dev/null +++ b/theme_kit/static/js/theme_kit.js @@ -0,0 +1,32 @@ +odoo.define('theme_kit.model', function (require) { + "use strict"; + + function add_active_class_top_panel(elem) + { + if($('#odooMenuBarNav > div > div.o_sub_menu_content > ul > li > a') != undefined){ + $('#odooMenuBarNav > div > div.o_sub_menu_content > ul > li > a').removeClass("active"); + $("#odooMenuBarNav > div > div.o_sub_menu_content > ul > li.active").removeClass("active") + } + if(localStorage.getItem($(elem).text().replace(/\s/g, ''))) + localStorage.setItem($(elem).text().replace(/\s/g, ''), true); + $(elem).addClass("active"); + } + + $(document).ready(function(){ + $('#odooMenuBarNav > div > div.o_sub_menu_content > ul > li > a').click(function (e) { + add_active_class_top_panel(this); + }); + $("#sidebar > li > a").click(function(e){ + if($("#sidebar > li > a") != undefined){ + $("#sidebar > li > a").removeClass("active"); + } + $(this).addClass("active"); + }); + $("#odooMenuBarNav > div > div > ul > li > ul > li").click(function(e){ + $(this.parentElement.parentElement.childNodes).each(function(){ + if($(this).hasClass("dropdown-toggle")) + setTimeout(add_active_class_top_panel, 10, this); + }); + }); + }); +}); \ No newline at end of file diff --git a/theme_kit/views/ir_attachment.xml b/theme_kit/views/ir_attachment.xml index d3dbccbb4f..c98b9d61be 100644 --- a/theme_kit/views/ir_attachment.xml +++ b/theme_kit/views/ir_attachment.xml @@ -1,6 +1,6 @@ + License LGPL-3.0 or later (http://www.gnu.org/licenses/lgpl.html). --> Login page wallpapers diff --git a/theme_kit/views/res_config.xml b/theme_kit/views/res_config.xml index 1b65969144..bc3b8e30ac 100644 --- a/theme_kit/views/res_config.xml +++ b/theme_kit/views/res_config.xml @@ -1,7 +1,7 @@ + License LGPL-3.0 or later (http://www.gnu.org/licenses/lgpl.html). --> + License LGPL-3.0 or later (http://www.gnu.org/licenses/lgpl.html). -->