diff --git a/room/static/scss/room_meeting_scss.scss b/room/static/scss/room_meeting_scss.scss index 0d694a65a..8958b834a 100644 --- a/room/static/scss/room_meeting_scss.scss +++ b/room/static/scss/room_meeting_scss.scss @@ -6,4 +6,117 @@ .list_room_width2{ width: 120px !important; max-width: 120px !important; -} \ No newline at end of file +} + +/* ===== 议题标题自动换行(room.booking 内嵌议题树) ===== */ +/* + 关键发现(调试后总结): + 1. Odoo list 视图字段的 style 属性【不会】应用到单元格(list_renderer 只把字段 class 推到 ), + 所以 直接死代码,写了等于没写。 + 2. 列宽由 决定,list 中字段的 class 同时落到 th 和 td(class = o__cell), + 因此可以同时锁表头和数据单元格的最大宽度。 + 3. many2one 显示态 DOM 是 , + 默认 display: inline-flex + 内嵌 nowrap。 + 4. 一旦有宽度约束,white-space:normal + word-break 即可让 inline 元素内的文字自然折行, + 【不需要】把元素强制 block——display:block 反而会撑高每行很多空白。 + + 修法(纯样式,零逻辑影响): + - 给议题列的 th/td 同时锁 max-width 320px(该类名仅 issue widget 使用,不会误伤其他列) + - 给最深的 / 加 white-space:normal + word-break,override Odoo 默认的 nowrap + - 保持行高/内边距走 Odoo 默认,不破坏表格视觉 +*/ +/* 锁列宽:议题列 - 用 !important 强制列宽生效 */ +.o_issue_m2o_confirm_create_cell { + max-width: 320px !important; + width: 320px !important; +} + +/* 强制换行 + 全面剥离 chip 容器样式:覆盖 Odoo 默认的 o-text-overflow mixin + 以及 editable list 中 o_field_many2one_selection 的 input 框样式。 + 用 * 选择器对所有子元素都生效,确保不漏任何一层。 */ +.o_issue_m2o_confirm_create_cell, +.o_issue_m2o_confirm_create_cell *, +.o_issue_m2o_confirm_create_cell .o_field_widget, +.o_issue_m2o_confirm_create_cell .o_field_many2one, +.o_issue_m2o_confirm_create_cell .o_field_many2one_selection, +.o_issue_m2o_confirm_create_cell .o_form_uri, +.o_issue_m2o_confirm_create_cell .o_form_uri > span, +.o_issue_m2o_confirm_create_cell a, +.o_issue_m2o_confirm_create_cell span, +.o_issue_m2o_confirm_create_cell input { + white-space: normal !important; + word-break: break-word !important; + overflow-wrap: break-word !important; + overflow: visible !important; + text-overflow: clip !important; + /* 全面去除可能产生"容器外观"的样式(边框/背景/圆角/阴影/内边距) */ + background: transparent !important; + background-color: transparent !important; + border: 0 !important; + border-color: transparent !important; + border-style: none !important; + border-radius: 0 !important; + box-shadow: none !important; + outline: 0 !important; + padding: 0 !important; + margin: 0 !important; +} + +/* 把 改为 display:contents,避开 inline-block 撑出的 chip-like 块盒; + 让它对布局"透明",只贡献文字内容,避免任何视觉容器。 */ +.o_issue_m2o_confirm_create_cell a { + display: contents !important; +} + +/* 兜底:保证 td 自身不被任意内容撑高 */ +.o_issue_m2o_confirm_create_cell { + line-height: normal !important; + vertical-align: middle; +} + +/* ===== 会议室预定 form 默认折叠的"详细信息"块 ===== */ +.o_inline_details { + border: 1px solid #e5e7eb; + border-radius: 6px; + background: #f9fafb; + padding: 0; +} +.o_inline_details_summary { + list-style: none; + cursor: pointer; + padding: 10px 14px; + border-radius: 6px 6px 0 0; + user-select: none; + background: #f3f4f6; + transition: background 0.15s ease; +} +.o_inline_details_summary:hover { + background: #e5e7eb; +} +.o_inline_details_summary::-webkit-details-marker { + display: none; /* 隐藏默认三角 */ +} +.o_inline_details_summary::before { + content: '\25B8'; /* 右侧小三角 ▶ */ + display: inline-block; + margin-right: 8px; + transition: transform 0.15s ease; + color: #6b7280; + font-size: 12px; +} +.o_inline_details[open] > .o_inline_details_summary::before { + transform: rotate(90deg); /* 展开时旋转 90° */ +} +.o_inline_details[open] > .o_inline_details_summary { + border-radius: 6px 6px 0 0; + border-bottom: 1px solid #e5e7eb; +} +.o_inline_details > .o_inline_details_summary + * { + padding: 12px 14px; +} +.o_room_booking_more_info .o_field_widget { + margin-bottom: 4px !important; /* 字段之间更紧凑 */ +} +.o_room_booking_core_fields .o_field_widget { + margin-bottom: 6px !important; /* 核心字段更宽松一点以便阅读 */ +} diff --git a/room/views/room_booking_views.xml b/room/views/room_booking_views.xml index 6affbaee3..8a42d1836 100644 --- a/room/views/room_booking_views.xml +++ b/room/views/room_booking_views.xml @@ -151,67 +151,76 @@ -
-

- -

-
+
- - + + + + - - - - - - - - - - - - - - + - - - - + + - - - + +
+ + + 详细信息 + (默认折叠,点击展开:组织者、部门、参会人员、通知等) + + + + + + + + + + + + + + + + + + + + + + + + + - - - - - - - - - - - - - +
+ @@ -244,10 +253,6 @@ - - - -
diff --git a/yuthon_issue/views/inherit_room_booking.xml b/yuthon_issue/views/inherit_room_booking.xml index 111cfa89f..655d0f75d 100644 --- a/yuthon_issue/views/inherit_room_booking.xml +++ b/yuthon_issue/views/inherit_room_booking.xml @@ -29,14 +29,23 @@