4667676b23
bugfix
2026-08-05 15:41:43 +08:00
9055f5ff6d
chore: add build/ and *.egg-info/ to .gitignore
2026-08-03 10:56:54 +08:00
fb613d0f70
fix: editable检查同时支持顶层和嵌套在editable中的URL
2026-07-01 16:31:38 +08:00
faa571ffe0
fix: filter_fields从browserfields.alters取data/dataurl/valueField
2026-07-01 15:51:24 +08:00
5107e6c830
fix: json.loads加引号包裹,json.dumps输出是Python字面量不是字符串
2026-06-30 10:31:32 +08:00
af6006ffe3
fix: Python上下文的json.dumps加json.loads包裹,避免true→True问题
2026-06-29 18:58:20 +08:00
32d7198710
chore: remove py3 from tracking, add to gitignore
2026-06-29 18:10:15 +08:00
88b10eedd7
fix: data_new_tmpl pkey → primary[0],修复 WHERE None = %s 错误
...
commit fc91486 在新增模板中加了回查 SELECT:
SELECT * FROM tbl WHERE {{summary[0].pkey}} = ${id}$
但 model 的 summary 里主键字段叫 primary 不是 pkey,
Jinja2 取不到返回 None,渲染成 ${None}$,
sqlor 处理后变成 WHERE None = %s。
改为 {{summary[0].primary[0]}},取 primary 数组第一个元素。
2026-06-29 18:07:58 +08:00
8cebcea4d7
bugfix
2026-06-26 13:49:38 +08:00
0d53ef67ed
bugfix
2026-06-26 13:48:30 +08:00
b4a9387ea8
bugfix
2026-06-26 13:47:27 +08:00
bc536b5fff
bugfix
2026-06-26 13:44:15 +08:00
5443064e75
bugfix
2026-06-26 13:41:22 +08:00
5b8733cc9c
bugfix
2026-06-26 13:38:54 +08:00
f57f786b63
bugfix
2026-06-26 13:30:07 +08:00
Hermes Agent
fc91486c05
fix: tree控件新增子项后回查记录返回user_data,修复子节点不显示问题
2026-06-24 22:13:36 +08:00
Hermes Agent
7b8010cf9f
fix: update CRUD验证跳过前端未传的字段,不做合法性检查
2026-06-24 18:01:31 +08:00
Hermes Agent
a55654674a
fix: template兼容无editable字段的CRUD定义,editable.binds访问前先检查editable存在性
2026-06-24 17:53:29 +08:00
Hermes Agent
981da3d1e5
fix: update模板空值处理 - 空字段跳过验证和更新
...
- 空字符串/None/NaN/null字段从ns中删除(除id外)
- 验证规则跳过空值(Update时空=未修改)
- 避免sor.U()用空值覆盖现有数据
2026-06-24 17:26:30 +08:00
Hermes Agent
1d0a187fca
fix: use editable.binds instead of form_binds for cascading dropdown support
2026-06-24 12:18:45 +08:00
Hermes Agent
94c1e1dfe5
feat: support form_binds in data_browser template for edit form cascading
2026-06-24 10:42:30 +08:00
Hermes Agent
3a8aff6b1b
Revert "feat: codes支持dbname字段实现跨库JOIN"
...
This reverts commit 51208f7295f4df053957941eff1531627766b2f3.
2026-06-24 09:24:52 +08:00
Hermes Agent
51208f7295
feat: codes支持dbname字段实现跨库JOIN
...
- construct_get_data_sql: 两个路径都支持c.dbname前缀
- get_code_desc: params中dbname优先用c.dbname
- models/*.json codes中添加dbname字段即可跨库引用
2026-06-24 09:18:30 +08:00
Hermes Agent
17f227aaad
fix: filter按钮去掉icon只保留label文字
2026-06-22 15:48:42 +08:00
Hermes Agent
88c989abdf
data_filter存在时自动注入搜索按钮到toolbar
2026-06-22 15:04:50 +08:00
Hermes Agent
e5ad09cc75
移除__pycache__和egg-info,添加.gitignore
2026-06-22 14:59:30 +08:00
Hermes Agent
f00d95654c
data_filter作为filterjson逻辑表达式,提取var构造搜索表单
2026-06-22 14:43:33 +08:00
Hermes Agent
b4ac434b62
分离search_fields(搜索表单字段定义)和data_filter(逻辑表达式)
2026-06-22 14:10:14 +08:00
Hermes Agent
db5f579464
支持data_filter显式声明op(LIKE),不自动对所有字符串字段模糊匹配
2026-06-22 13:53:30 +08:00
Hermes Agent
36267a18cc
搜索字符串字段使用LIKE模糊匹配
2026-06-22 13:40:02 +08:00
Hermes Agent
7c64b70e74
feat: move InlineForm into Tabular search_form option
...
Remove standalone InlineForm sibling from CRUD template. Pass filter
fields as search_form config inside Tabular options. Toolbar filter
button toggles the embedded form visibility.
2026-06-22 13:27:22 +08:00
Hermes Agent
11fe135a40
fix: script uses app. prefix for getWidgetById sibling resolution
...
bricks.app.root is not a widget (no .dom_element), causing get_by_id to fail.
Use bricks.getWidgetById('app.tblname_tbl') without second arg — bricks
resolves 'app' to bricks.app automatically, then searches downward from root.
2026-06-22 12:26:45 +08:00
Hermes Agent
ab7528420f
fix: InlineForm bind target uses app. prefix for sibling resolution
...
InlineForm is a child of VBox, Tabular is a sibling. Without app. prefix,
getWidgetById searches downward from InlineForm and never finds the sibling
Tabular, causing silent bind failure (no request, no error).
2026-06-22 12:16:55 +08:00
Hermes Agent
9356b8ae36
feat: search form code fields auto-add prepend_all=1 to dataurl
...
InlineForm search fields with uitype='code' now get dataurl with
?prepend_all=1 so get_code.dspy adds a '全部' empty-value option.
2026-06-22 12:11:52 +08:00
Hermes Agent
66bd6339df
fix: InlineForm search bind uses actiontype script to pass form values to Tabular.render()
...
actiontype:method calls render() without args, losing search params.
Changed to actiontype:script with getWidgetById + await tbl.render(params)
which correctly receives merged InlineForm submit data as params argument.
2026-06-22 12:09:25 +08:00
Hermes Agent
5295a1ce8f
feat: auto-enrich data_filter code fields with valueField/textField/params/dataurl from model codes
...
When data_filter declares uitype='code' for a search field, xls2crud now
automatically looks up the matching code definition in models/*.json codes
array and populates valueField, textField, params (dbname/table/tblvalue/
tbltext), and dataurl. This prevents UiCode crash (Cannot read properties
of undefined reading 'length') in InlineForm search forms.
2026-06-22 11:56:15 +08:00
Hermes Agent
70b6997fca
fix: root VBox use height:100% instead of cheight:40
2026-06-19 14:29:57 +08:00
Hermes Agent
69c5706753
Revert "fix: root VBox use height:100% instead of cheight:40"
...
This reverts commit 75066bb1b0359ffb8c3c9ab782435d33c4fdef4e.
2026-06-19 14:26:21 +08:00
Hermes Agent
75066bb1b0
fix: root VBox use height:100% instead of cheight:40
2026-06-19 14:25:00 +08:00
Hermes Agent
6b8bc8bee3
feat: auto-generate InlineForm for data_filter fields
...
- When data_filter.fields exists, generate InlineForm with search inputs
- Bind submit event to refresh Tabular
- Each field uses uitype from data_filter definition
2026-06-18 17:40:07 +08:00
Hermes Agent
3c5552db14
fix: add data_filter field definition guard to CRUD template
...
- Check if filterjson is CRUD field definition ({'fields': [...]})
- Set filterjson to None to avoid DBFilter AssertionError
- Fixes issue where data_filter parameter causes 500 error
2026-06-18 17:24:11 +08:00
Hermes Agent
3f8a0ce876
feat: CRUD auto-generates validation code from alters.rules
...
- extract_validation_rules() extracts rules from browserfields.alters
- data_new_tmpl: adds runtime validation before DB insert
- data_update_tmpl: adds runtime validation before DB update
- Supports: required, minlength, maxlength, min, max, pattern, email, number
- Backend returns Error widget with validation messages on failure
2026-06-18 17:22:12 +08:00
ebd4b4a99e
fix: get_data_tmpl 注入 logined 过滤条件到 data_filter
...
- 确保 logined_userorgid 和 logined_userid 始终作为过滤条件
- 统一 filterjson 为 AND 结构后追加
- 解决有 data_filter 时 ownerid/userid 隔离失效的问题
2026-06-02 17:27:05 +08:00
529025a5f4
fix: wrap Tabular in VBox with cheight for proper scrolling
2026-05-29 22:10:02 +08:00
9f9a60a732
fix: use data_url instead of get_data_url to match JSON key
2026-05-29 19:49:43 +08:00
3a865e89a2
fix: wrap desc in DictObject for attribute access in subtable2toolbar
2026-05-29 19:47:43 +08:00
057ca605c1
feat: pass data_filter/filter_labels to Tabular widget; fix json.loads for data_filter string
2026-05-29 19:44:32 +08:00
41f5b65f1f
bugfix
2026-05-22 17:21:47 +08:00
931b2d7035
bugfix
2026-05-22 17:08:53 +08:00
d406fe5ce7
bugfix
2026-05-22 17:06:42 +08:00