mirror of
https://github.com/Nikolay-Shirokov/cc-1c-skills.git
synced 2026-09-14 22:05:22 +03:00
feat(web-test): распознавание колонок-картинок в readTable
readTable теперь отдаёт картиночные ячейки как 'pic:<N>' (есть иконка) или '' (нет): N — индекс кадра спрайта, кодирующий состояние. Присутствие читается как truthy, разные иконки различаются по индексу. Безымянные картиночные колонки (напр. индикатор присоединённых файлов) больше не выпадают — именуются по title-тултипу, fallback '(picture)'. - dom/grid.mjs: helper picInfo (парсинг gx из pictureCollection url, исключение декоративных иконок дерева/групп); ветка пустого заголовка добавляет картиночные колонки; resolveCol резолвит колонку по тексту И по title (клик по картиночной колонке). - click-cell.mjs: fail-fast при попытке отбора строки по 'pic:N' — понятная ошибка вместо row_not_found (картинки read/assert-only). - SKILL.md: компактный раздел про картиночные колонки. Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
This commit is contained in:
co-authored by
Claude Opus 4.8
parent
89b109ab04
commit
f2b8ad741e
@@ -174,6 +174,12 @@ Read actual grid data with pagination. Each row is `{ columnName: value }`.
|
||||
| `offset` | 0 | Skip first N rows |
|
||||
| `table` | — | Grid name from `tables[]` (for multi-grid forms) |
|
||||
|
||||
**Picture columns.** Cells that render an icon (status/stage marks, the "ЭДО" mark, the attached-files paperclip) read as `'pic:<N>'` (`N` = icon frame/state) when shown, `''` when absent — so presence is truthy and icons differ by index. Icon-only columns (no header text) still appear, named by their tooltip or `'(picture)'`. These values are read-only — filter/select rows by a text column, not by `'pic:N'`.
|
||||
```js
|
||||
if (t.rows[0]['Присоединенные файлы']) { /* has an attached file */ }
|
||||
t.rows[0]['ЭДО'] === 'pic:1'; // connected to 1С-ЭДО ('pic:0' = not)
|
||||
```
|
||||
|
||||
Special row fields:
|
||||
- `_kind: 'group'` — hierarchical group row
|
||||
- `_kind: 'parent'` — parent row in hierarchy
|
||||
|
||||
Reference in New Issue
Block a user