Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
erp5
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Labels
Merge Requests
0
Merge Requests
0
Analytics
Analytics
Repository
Value Stream
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Commits
Open sidebar
Romain Courteaud
erp5
Commits
91e081b5
Commit
91e081b5
authored
Dec 20, 2019
by
Romain Courteaud
🐙
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
[erp5_administration] Support editing components
parent
13c52bb3
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
21 additions
and
7 deletions
+21
-7
bt5/erp5_administration/SkinTemplateItem/portal_skins/erp5_administration/BusinessTemplate_getPythonSourceCodeMessageList.py
...ration/BusinessTemplate_getPythonSourceCodeMessageList.py
+21
-7
No files found.
bt5/erp5_administration/SkinTemplateItem/portal_skins/erp5_administration/BusinessTemplate_getPythonSourceCodeMessageList.py
View file @
91e081b5
...
...
@@ -7,21 +7,34 @@ class Message:
Supports both being displayed in a listbox and being printed.
"""
def
__init__
(
self
,
location
,
message
,
edit_url
):
def
__init__
(
self
,
location
,
message
,
edit_url
,
jio_key
=
None
):
self
.
location
=
location
self
.
message
=
message
self
.
edit_url
=
edit_url
self
.
jio_key
=
jio_key
def
getListItemUrl
(
self
,
*
args
,
**
kw
):
return
self
.
edit_url
def
getListItemUrlDict
(
self
,
*
args
,
**
kw
):
return
{
'command'
:
'raw'
,
'options'
:
{
'url'
:
self
.
edit_url
if
self
.
jio_key
is
None
:
# Use raw portal skins edition
return
{
'command'
:
'raw'
,
'options'
:
{
'url'
:
self
.
edit_url
}
}
else
:
# Stay in ERP5JS
# XXX How to focus on the line to change directly?
return
{
'command'
:
'push_history'
,
'options'
:
{
'jio_key'
:
self
.
jio_key
,
'editable'
:
True
,
}
}
}
def
__repr__
(
self
):
return
"{}:{}"
.
format
(
self
.
location
,
self
.
message
)
...
...
@@ -60,7 +73,8 @@ def checkComponent(component_instance):
Message
(
location
=
"{component_path}:{row}:{column}"
.
format
(
**
annotation
),
message
=
annotation
[
"text"
],
edit_url
=
"{component_path}?line={row}"
.
format
(
**
annotation
),))
edit_url
=
"{component_path}?line={row}"
.
format
(
**
annotation
),
jio_key
=
annotation
[
'component_path'
],),)
# Check scripts
script_container_list
=
[]
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment