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
3b604f73
Commit
3b604f73
authored
Feb 24, 2021
by
Romain Courteaud
🐸
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
erp5_core: editor: display read only text as code
parent
f97c3890
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
6 additions
and
0 deletions
+6
-0
product/ERP5/bootstrap/erp5_core/SkinTemplateItem/portal_skins/erp5_core/gadget_editor.js.js
...inTemplateItem/portal_skins/erp5_core/gadget_editor.js.js
+6
-0
No files found.
product/ERP5/bootstrap/erp5_core/SkinTemplateItem/portal_skins/erp5_core/gadget_editor.js.js
View file @
3b604f73
...
...
@@ -80,6 +80,7 @@
gadget
=
this
,
div
=
document
.
createElement
(
'
div
'
),
div_max
=
document
.
createElement
(
'
div
'
),
code
,
queue
=
new
RSVP
.
Queue
();
if
((
modification_dict
.
hasOwnProperty
(
'
editable
'
))
||
...
...
@@ -199,6 +200,11 @@
.
push
(
function
(
evt
)
{
element
.
querySelector
(
'
img
'
).
src
=
evt
.
target
.
result
;
});
}
else
if
(
editor_dict
.
hasOwnProperty
(
gadget
.
state
.
editor
))
{
code
=
document
.
createElement
(
'
code
'
);
code
.
textContent
=
gadget
.
state
.
value
;
element
.
querySelector
(
'
pre
'
).
textContent
=
''
;
element
.
querySelector
(
'
pre
'
).
appendChild
(
code
);
}
else
{
element
.
querySelector
(
'
pre
'
).
textContent
=
gadget
.
state
.
value
;
}
...
...
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