Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
C
Coopdevs OCB mirror
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
External wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Package registry
Container registry
Model registry
Operate
Environments
Terraform modules
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
Coopdevs
Odoo
Coopdevs OCB mirror
Commits
d115ef9b
Commit
d115ef9b
authored
11 years ago
by
Thibault Delavallée
Committed by
Martin Trigaux
10 years ago
Browse files
Options
Downloads
Patches
Plain Diff
[FIX] web: more backports for cleditor
Restauring changes removed by the update of the library
bff34f40
17a23c60
cc23ddd0
5c45aac7
parent
aea9c968
Branches
Branches containing commit
Tags
Tags containing commit
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
addons/web/static/lib/cleditor/jquery.cleditor.js
+14
-6
14 additions, 6 deletions
addons/web/static/lib/cleditor/jquery.cleditor.js
with
14 additions
and
6 deletions
addons/web/static/lib/cleditor/jquery.cleditor.js
+
14
−
6
View file @
d115ef9b
...
...
@@ -47,7 +47,7 @@
docCSSFile
:
// CSS file used to style the document contained within the editor
""
,
bodyStyle
:
// style to assign to document body contained within the editor
"
margin:4px;
font:10pt Arial,Verdana
; cursor:text
"
"
margin:4px;
color:#4c4c4c; font-size:13px; font-family:
\"
Lucida Grande
\"
,Helvetica,Verdana,Arial,sans-serif
; cursor:text
"
},
// Define all usable toolbar buttons - the init string property is
...
...
@@ -306,8 +306,17 @@
// Bind the window resize event when the width or height is auto or %
if
(
/auto|%/
.
test
(
""
+
options
.
width
+
options
.
height
))
$
(
window
).
bind
(
'
resize.cleditor
'
,
function
()
{
refresh
(
editor
);
});
$
(
window
).
bind
(
'
resize.cleditor
'
,
function
()
{
//Forcefully blurred iframe contentWindow, chrome, IE, safari doesn't trigger blur on window resize and due to which text disappears
var
contentWindow
=
editor
.
$frame
[
0
].
contentWindow
;
if
(
!
$
.
browser
.
mozilla
&&
contentWindow
){
$
(
contentWindow
).
trigger
(
'
blur
'
);
}
// CHM Note MonkeyPatch: if the DOM is not remove, refresh the cleditor
if
(
editor
.
$main
.
parent
().
parent
().
size
())
{
refresh
(
editor
);
}
});
// Create the iframe and resize the controls
refresh
(
editor
);
...
...
@@ -357,7 +366,6 @@
// change - shortcut for .bind("change", handler) or .trigger("change")
fn
.
change
=
function
change
(
handler
)
{
console
.
log
(
'
change test
'
);
var
$this
=
$
(
this
);
return
handler
?
$this
.
bind
(
CHANGE
,
handler
)
:
$this
.
trigger
(
CHANGE
);
};
...
...
@@ -586,7 +594,7 @@
//==================
// Private Functions
//==================
// checksum - returns a checksum using the Adler-32 method
function
checksum
(
text
)
{
...
...
@@ -929,7 +937,7 @@
var
$toolbar
=
editor
.
$toolbar
,
$group
=
$toolbar
.
children
(
"
div:last
"
),
wid
=
$main
.
width
();
wid
=
/%/
.
test
(
""
+
options
.
width
)
?
options
.
width
:
$main
.
width
();
// Resize the toolbar
var
hgt
=
$group
.
offset
().
top
+
$group
.
outerHeight
()
-
$toolbar
.
offset
().
top
+
1
;
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment