diff --git a/app_ui_enhance/__openerp__.py b/app_ui_enhance/__openerp__.py index 926633b4..9e3f5537 100644 --- a/app_ui_enhance/__openerp__.py +++ b/app_ui_enhance/__openerp__.py @@ -27,6 +27,7 @@ 1.Search by date or number range in List view and Pivot view. 2.Instructions for Activating List background color property. 3.Reset the barcode format. + 4.Draggable Dialog """, 'description': """ @@ -54,7 +55,7 @@ eg. -------------------------------------------------- """, - 'depends': ['web', 'app_odoo_customize'], + 'depends': ['web', 'report', 'app_odoo_customize'], 'data': [ 'views/app_ui_config_settings_view.xml', 'views/template_view.xml', diff --git a/app_ui_enhance/static/src/css/app_report_enhance.css b/app_ui_enhance/static/src/css/app_report_enhance.css new file mode 100644 index 00000000..8d69b38c --- /dev/null +++ b/app_ui_enhance/static/src/css/app_report_enhance.css @@ -0,0 +1,10 @@ +/* report更紧凑,无边框 */ +.table-tight td { + padding: 2px !important; + border-top: 0px !important; +} +.table-tight > thead > tr > th, .table-tight > tbody > tr > th, .table-tight > tfoot > tr > th, +.table-tight > thead > tr > td, .table-tight > tbody > tr > td, .table-tight > tfoot > tr > td{ + padding: 2px !important; + border-top: 0px !important; +} \ No newline at end of file diff --git a/app_ui_enhance/static/src/css/app_ui_enhance.css b/app_ui_enhance/static/src/css/app_ui_enhance.css index a3ca48ad..929a62b0 100644 --- a/app_ui_enhance/static/src/css/app_ui_enhance.css +++ b/app_ui_enhance/static/src/css/app_ui_enhance.css @@ -9,18 +9,21 @@ top: 3px; content: ""; } + /* list标头不换行 */ .table-responsive { white-space: nowrap !important; } + /* sheet全宽 */ .o_form_view .o_form_sheet_bg .o_form_sheet { - max-width: 98%!important; + max-width: 98% !important; } + /* 强制表格滚动,企业版/社区版中生效 */ @@ -30,26 +33,39 @@ sheet全宽 overflow: hidden !important; overflow-x: auto !important; } + .force_scroll ::-webkit-scrollbar { - height: 16px!important; + height: 16px !important; } + /* 滚动条的滑轨背景颜色 */ .force_scroll ::-webkit-scrollbar-track { - background-color: lightgrey!important;; - -webkit-border-radius: 2em !important;; - -moz-border-radius: 2em !important;; - border-radius: 2em !important;; + background-color: lightgrey !important; + -webkit-border-radius: 2em !important; + -moz-border-radius: 2em !important; + border-radius: 2em !important; } /* 滑块颜色 */ .force_scroll ::-webkit-scrollbar-thumb { - background-color: #666666 !important;; - -webkit-border-radius: 2em !important;; - -moz-border-radius: 2em !important;; - border-radius: 2em !important;; + background-color: #666666 !important; + -webkit-border-radius: 2em !important; + -moz-border-radius: 2em !important; + border-radius: 2em !important; } /* 横向滚动条和纵向滚动条相交处尖角的颜色 */ .force_scroll ::-webkit-scrollbar-corner { background-color: black; +} + +/* report更紧凑,无边框 */ +.table-tight td { + padding: 2px !important; + border-top: 0px !important; +} +.table-tight > thead > tr > th, .table-tight > tbody > tr > th, .table-tight > tfoot > tr > th, +.table-tight > thead > tr > td, .table-tight > tbody > tr > td, .table-tight > tfoot > tr > td{ + padding: 2px !important; + border-top: 0px !important; } \ No newline at end of file diff --git a/app_ui_enhance/static/src/css/app_web_enhance.css b/app_ui_enhance/static/src/css/app_web_enhance.css new file mode 100644 index 00000000..05039982 --- /dev/null +++ b/app_ui_enhance/static/src/css/app_web_enhance.css @@ -0,0 +1,60 @@ +.tree_search_item { + cursor: pointer; +} + +.tree_search_item .selected a:before { + font-family: FontAwesome; + position: absolute; + left: 6px; + top: 3px; + content: ""; +} + +/* +list标头不换行 +*/ +.table-responsive { + white-space: nowrap !important; +} + +/* +sheet全宽 +*/ +.o_form_view .o_form_sheet_bg .o_form_sheet { + max-width: 98% !important; +} + +/* +强制表格滚动,企业版/社区版中生效 +*/ + +.force_scroll .table-responsive { + white-space: nowrap !important; + overflow: hidden !important; + overflow-x: auto !important; +} + +.force_scroll ::-webkit-scrollbar { + height: 16px !important; +} + +/* 滚动条的滑轨背景颜色 */ +.force_scroll ::-webkit-scrollbar-track { + background-color: lightgrey !important; + -webkit-border-radius: 2em !important; + -moz-border-radius: 2em !important; + border-radius: 2em !important; +} + +/* 滑块颜色 */ +.force_scroll ::-webkit-scrollbar-thumb { + background-color: #666666 !important; + -webkit-border-radius: 2em !important; + -moz-border-radius: 2em !important; + border-radius: 2em !important; +} + +/* 横向滚动条和纵向滚动条相交处尖角的颜色 */ +.force_scroll ::-webkit-scrollbar-corner { + background-color: black; +} \ No newline at end of file diff --git a/app_ui_enhance/static/src/js/web_draggable_dialog.js b/app_ui_enhance/static/src/js/web_draggable_dialog.js new file mode 100644 index 00000000..ae191708 --- /dev/null +++ b/app_ui_enhance/static/src/js/web_draggable_dialog.js @@ -0,0 +1,17 @@ +odoo.define('app_ui_enhance.web_draggable_dialog', function (require) { +'use strict'; + + var Dialog = require('web.Dialog'); + + Dialog.include({ + open: function () { + this._super.apply(this, arguments); + this._opened.done(function(){ + $(".modal.in").draggable({ + handle: ".modal-header" + }); + }); + return this; + }, + }); +}); diff --git a/app_ui_enhance/views/template_view.xml b/app_ui_enhance/views/template_view.xml index 096cf983..ff147b7d 100644 --- a/app_ui_enhance/views/template_view.xml +++ b/app_ui_enhance/views/template_view.xml @@ -3,11 +3,18 @@ + +