mirror of
https://github.com/Nikolay-Shirokov/cc-1c-skills.git
synced 2026-08-03 02:00:22 +03:00
fix(cfe-borrow,form-edit,cfe-patch-method): fix borrowed form structure to match Configurator
- cfe-borrow: keep AutoCommandBar ChildItems (buttons) with CommandName=0 instead of stripping them — Configurator expects buttons to be present - form-edit: insert Events section after AutoCommandBar, not before — matches Configurator's element ordering - cfe-patch-method(py): fix \r\r\n double line endings by using newline="" in open() calls Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
This commit is contained in:
co-authored by
Claude Opus 4.6
parent
8584021446
commit
84d078bd05
@@ -500,12 +500,12 @@ function Borrow-Form {
|
||||
# Get OuterXml and strip redundant namespace redeclarations (they're on root <Form>)
|
||||
$nsStripPattern = '\s+xmlns(?::\w+)?="[^"]*"'
|
||||
|
||||
# AutoCommandBar: strip ChildItems (buttons), replace CommandName→0, Autofill→false
|
||||
# AutoCommandBar: keep ChildItems (buttons with CommandName→0), Autofill→false
|
||||
$autoCmdXml = ""
|
||||
if ($srcAutoCmd) {
|
||||
$autoCmdXml = $srcAutoCmd.OuterXml
|
||||
$autoCmdXml = [regex]::Replace($autoCmdXml, $nsStripPattern, '')
|
||||
$autoCmdXml = [regex]::Replace($autoCmdXml, '(?s)\s*<ChildItems>.*?</ChildItems>', '')
|
||||
$autoCmdXml = [regex]::Replace($autoCmdXml, '<CommandName>[^<]*</CommandName>', '<CommandName>0</CommandName>')
|
||||
$autoCmdXml = $autoCmdXml -replace '<Autofill>true</Autofill>', '<Autofill>false</Autofill>'
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user