add dialog draggable

This commit is contained in:
ivan deng
2018-01-31 20:47:35 +08:00
parent 000712850a
commit cd5f47581d
6 changed files with 123 additions and 12 deletions

View File

@@ -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',

View File

@@ -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;
}

View File

@@ -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;
}
/*
强制表格滚动,企业版/社区版中生效
*/
@@ -30,26 +33,39 @@ sheet全宽
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;;
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;
}

View File

@@ -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;
}

View File

@@ -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;
},
});
});

View File

@@ -3,11 +3,18 @@
<data>
<template id="assets_backend" name="app_ui_enhance asset" inherit_id="web.assets_backend">
<xpath expr="." position="inside">
<link rel="stylesheet" type="text/css" href="/app_ui_enhance/static/src/css/app_ui_enhance.css"/>
<link rel="stylesheet" type="text/css" href="/app_ui_enhance/static/src/css/app_web_enhance.css"/>
<link rel="stylesheet" href="/app_ui_enhance/static/src/css/web_list_bg_color.css"/>
<script type="text/javascript" src="/app_ui_enhance/static/src/js/pivot.js"></script>
<script type="text/javascript" src="/app_ui_enhance/static/src/js/tree.js"></script>
<script type="text/javascript" src="/app_ui_enhance/static/src/js/web_list_bg_color.js"></script>
<script type="text/javascript" src="/app_ui_enhance/static/src/js/web_draggable_dialog.js"></script>
</xpath>
</template>
<template id="assets_common" name="app_ui_enhance asset" inherit_id="report.assets_common">
<xpath expr="." position="inside">
<link rel="stylesheet" type="text/css" href="/app_ui_enhance/static/src/css/app_report_enhance.css"/>
</xpath>
</template>