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
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Analytics
Analytics
CI / CD
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Léo-Paul Géneau
erp5
Commits
6224a80f
Commit
6224a80f
authored
May 02, 2018
by
Nicolas Wavrant
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
erp5_xhtml_style: let CKEDITOR open inner links when in read-only mode
parent
04639363
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
17 additions
and
0 deletions
+17
-0
product/ERP5/bootstrap/erp5_xhtml_style/SkinTemplateItem/portal_skins/erp5_ckeditor/ckeditor.gadget.js.js
...lateItem/portal_skins/erp5_ckeditor/ckeditor.gadget.js.js
+17
-0
No files found.
product/ERP5/bootstrap/erp5_xhtml_style/SkinTemplateItem/portal_skins/erp5_ckeditor/ckeditor.gadget.js.js
View file @
6224a80f
...
...
@@ -127,6 +127,7 @@
MATCH_MEDIA
=
window
.
matchMedia
(
"
not screen and (min-width: 45em)
"
);
rJS
(
window
)
.
declareAcquiredMethod
(
"
redirect
"
,
"
redirect
"
)
.
declareAcquiredMethod
(
"
notifySubmit
"
,
"
notifySubmit
"
)
.
declareJob
(
"
deferNotifySubmit
"
,
function
()
{
// Ensure error will be correctly handled
...
...
@@ -212,6 +213,22 @@
event
.
editor
.
execCommand
(
'
maximize
'
);
});
gadget
.
ckeditor
.
on
(
'
change
'
,
gadget
.
deferNotifyChange
.
bind
(
gadget
));
// Let CKEDITOR open inner links when in read-only mode
gadget
.
ckeditor
.
on
(
'
contentDom
'
,
function
()
{
var
editable
=
gadget
.
ckeditor
.
editable
();
editable
.
attachListener
(
editable
,
'
click
'
,
function
(
event
)
{
var
link
=
new
CKEDITOR
.
dom
.
elementPath
(
event
.
data
.
getTarget
(),
this
).
contains
(
'
a
'
);
if
(
link
&&
event
.
data
.
$
.
button
!=
2
&&
link
.
isReadOnly
())
{
return
gadget
.
redirect
({
'
command
'
:
'
raw
'
,
'
options
'
:
{
'
url
'
:
link
.
getAttribute
(
'
href
'
)
}
},
true
);
}
},
null
,
null
,
15
);
});
}
if
(
modification_dict
.
hasOwnProperty
(
'
value
'
))
{
this
.
ckeditor
.
setData
(
this
.
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