Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
W
web-apps
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
Analytics
Analytics
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
Boris Kocherov
web-apps
Commits
96dba54f
Commit
96dba54f
authored
Dec 26, 2016
by
Julia Radzhabova
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
[DE] Show footnote tooltip. Debug applying note settings.
Fix fast mousemove from one footnote/hyperlink to another.
parent
e93ec604
Changes
5
Hide whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
72 additions
and
52 deletions
+72
-52
apps/common/main/lib/component/Tooltip.js
apps/common/main/lib/component/Tooltip.js
+2
-2
apps/common/main/resources/less/tooltip.less
apps/common/main/resources/less/tooltip.less
+4
-0
apps/documenteditor/main/app/controller/Toolbar.js
apps/documenteditor/main/app/controller/Toolbar.js
+2
-5
apps/documenteditor/main/app/view/DocumentHolder.js
apps/documenteditor/main/app/view/DocumentHolder.js
+60
-32
apps/documenteditor/main/app/view/NoteSettingsDialog.js
apps/documenteditor/main/app/view/NoteSettingsDialog.js
+4
-13
No files found.
apps/common/main/lib/component/Tooltip.js
View file @
96dba54f
...
...
@@ -120,8 +120,8 @@
this
.
getBSTip
().
show
(
at
);
},
hide
:
function
()
{
this
.
getBSTip
().
hide
();
hide
:
function
(
callback
)
{
this
.
getBSTip
().
hide
(
callback
);
},
setTitle
:
function
(
title
)
{
...
...
apps/common/main/resources/less/tooltip.less
View file @
96dba54f
...
...
@@ -50,3 +50,7 @@
word-wrap: break-word;
max-width: 300px;
}
.link-tooltip .tooltip-inner {
max-width: 500px;
}
\ No newline at end of file
apps/documenteditor/main/app/controller/Toolbar.js
View file @
96dba54f
...
...
@@ -2013,12 +2013,9 @@ define([
api
:
me
.
api
,
handler
:
function
(
result
,
settings
)
{
if
(
settings
)
{
if
(
result
==
'
insert
'
)
{
me
.
api
.
asc_SetFootnoteProps
(
settings
.
props
);
me
.
api
.
asc_SetFootnoteProps
(
settings
.
props
,
settings
.
applyToAll
);
if
(
result
==
'
insert
'
)
me
.
api
.
asc_AddFootnote
(
settings
.
custom
);
}
else
if
(
result
==
'
apply
'
)
{
me
.
api
.
asc_SetFootnoteProps
(
settings
.
props
);
}
}
Common
.
NotificationCenter
.
trigger
(
'
edit:complete
'
,
me
.
toolbar
);
},
...
...
apps/documenteditor/main/app/view/DocumentHolder.js
View file @
96dba54f
...
...
@@ -327,7 +327,8 @@ define([
toolTip
:
new
Common
.
UI
.
Tooltip
({
owner
:
this
,
html
:
true
,
title
:
'
<br><b>Press Ctrl and click link</b>
'
title
:
'
<br><b>Press Ctrl and click link</b>
'
,
cls
:
'
link-tooltip
'
// style: 'word-wrap: break-word;'
}),
strTip
:
''
,
...
...
@@ -335,7 +336,6 @@ define([
isVisible
:
false
};
/** coauthoring begin **/
var
userTooltip
=
true
;
...
...
@@ -401,7 +401,6 @@ define([
};
var
onMouseMoveStart
=
function
()
{
screenTip
.
isHidden
=
true
;
/** coauthoring begin **/
if
(
me
.
usertips
.
length
>
0
)
{
...
...
@@ -418,10 +417,18 @@ define([
/** coauthoring end **/
};
var
mouseMoveData
=
null
,
isTooltipHiding
=
false
;
var
onMouseMoveEnd
=
function
()
{
if
(
screenTip
.
isHidden
&&
screenTip
.
isVisible
)
{
screenTip
.
isVisible
=
false
;
screenTip
.
toolTip
.
hide
();
isTooltipHiding
=
true
;
screenTip
.
toolTip
.
hide
(
function
(){
isTooltipHiding
=
false
;
if
(
mouseMoveData
)
onMouseMove
(
mouseMoveData
);
mouseMoveData
=
null
;
});
}
};
...
...
@@ -436,42 +443,63 @@ define([
}
if
(
moveData
)
{
var
showPoint
,
ToolTip
;
var
showPoint
,
ToolTip
,
type
=
moveData
.
get_Type
();
if
(
moveData
.
get_Type
()
==
1
)
{
// 1 - hyperlink
var
hyperProps
=
moveData
.
get_Hyperlink
();
var
recalc
=
false
;
if
(
hyperProps
)
{
screenTip
.
isHidden
=
false
;
if
(
type
==
1
||
type
==
3
)
{
// 1 - hyperlink, 3 - footnote
if
(
isTooltipHiding
)
{
mouseMoveData
=
moveData
;
return
;
}
if
(
type
==
1
)
{
var
hyperProps
=
moveData
.
get_Hyperlink
();
if
(
!
hyperProps
)
return
;
ToolTip
=
(
_
.
isEmpty
(
hyperProps
.
get_ToolTip
()))
?
hyperProps
.
get_Value
()
:
hyperProps
.
get_ToolTip
();
ToolTip
=
Common
.
Utils
.
String
.
htmlEncode
(
ToolTip
);
}
else
{
ToolTip
=
moveData
.
get_FootnoteText
();
if
(
ToolTip
.
length
>
1000
)
ToolTip
=
ToolTip
.
substr
(
0
,
1000
)
+
'
...
'
;
}
if
(
screenTip
.
tipLength
!==
ToolTip
.
length
||
screenTip
.
strTip
.
indexOf
(
ToolTip
)
<
0
)
{
screenTip
.
toolTip
.
setTitle
(
ToolTip
+
'
<br><b>
'
+
me
.
txtPressLink
+
'
</b>
'
);
screenTip
.
tipLength
=
ToolTip
.
length
;
screenTip
.
strTip
=
ToolTip
;
recalc
=
true
;
}
var
recalc
=
false
;
screenTip
.
isHidden
=
false
;
showPoint
=
[
moveData
.
get_X
(),
moveData
.
get_Y
()];
showPoint
[
1
]
+=
(
me
.
_XY
[
1
]
-
15
);
showPoint
[
0
]
+=
(
me
.
_XY
[
0
]
+
5
);
ToolTip
=
Common
.
Utils
.
String
.
htmlEncode
(
ToolTip
);
if
(
!
screenTip
.
isVisible
||
recalc
)
{
screenTip
.
isVisible
=
true
;
screenTip
.
toolTip
.
show
([
-
10000
,
-
10000
]);
}
if
(
screenTip
.
tipType
!==
type
||
screenTip
.
tipLength
!==
ToolTip
.
length
||
screenTip
.
strTip
.
indexOf
(
ToolTip
)
<
0
)
{
screenTip
.
toolTip
.
setTitle
((
type
==
1
)
?
(
ToolTip
+
'
<br><b>
'
+
me
.
txtPressLink
+
'
</b>
'
)
:
ToolTip
);
screenTip
.
tipLength
=
ToolTip
.
length
;
screenTip
.
strTip
=
ToolTip
;
screenTip
.
tipType
=
type
;
recalc
=
true
;
}
if
(
recalc
)
{
screenTip
.
tipHeight
=
screenTip
.
toolTip
.
getBSTip
().
$tip
.
height
();
screenTip
.
tipWidth
=
screenTip
.
toolTip
.
getBSTip
().
$tip
.
width
();
}
showPoint
[
1
]
-=
screenTip
.
tipHeight
;
if
(
showPoint
[
0
]
+
screenTip
.
tipWidth
>
me
.
_BodyWidth
)
showPoint
[
0
]
=
me
.
_BodyWidth
-
screenTip
.
tipWidth
;
screenTip
.
toolTip
.
getBSTip
().
$tip
.
css
({
top
:
showPoint
[
1
]
+
'
px
'
,
left
:
showPoint
[
0
]
+
'
px
'
});
showPoint
=
[
moveData
.
get_X
(),
moveData
.
get_Y
()];
showPoint
[
1
]
+=
(
me
.
_XY
[
1
]
-
15
);
showPoint
[
0
]
+=
(
me
.
_XY
[
0
]
+
5
);
if
(
!
screenTip
.
isVisible
||
recalc
)
{
screenTip
.
isVisible
=
true
;
screenTip
.
toolTip
.
show
([
-
10000
,
-
10000
]);
}
if
(
recalc
)
{
screenTip
.
tipHeight
=
screenTip
.
toolTip
.
getBSTip
().
$tip
.
height
();
screenTip
.
tipWidth
=
screenTip
.
toolTip
.
getBSTip
().
$tip
.
width
();
}
recalc
=
false
;
if
(
showPoint
[
0
]
+
screenTip
.
tipWidth
>
me
.
_BodyWidth
)
{
showPoint
[
0
]
=
me
.
_BodyWidth
-
screenTip
.
tipWidth
;
recalc
=
true
;
}
if
(
showPoint
[
1
]
-
screenTip
.
tipHeight
<
0
)
{
showPoint
[
1
]
=
(
recalc
)
?
showPoint
[
1
]
+
30
:
0
;
}
else
showPoint
[
1
]
-=
screenTip
.
tipHeight
;
screenTip
.
toolTip
.
getBSTip
().
$tip
.
css
({
top
:
showPoint
[
1
]
+
'
px
'
,
left
:
showPoint
[
0
]
+
'
px
'
});
}
/** coauthoring begin **/
else
if
(
moveData
.
get_Type
()
==
2
&&
me
.
mode
.
isEdit
)
{
// 2 - locked object
...
...
apps/documenteditor/main/app/view/NoteSettingsDialog.js
View file @
96dba54f
...
...
@@ -216,11 +216,11 @@ define([
menuStyle
:
'
min-width: 150px;
'
,
editable
:
false
,
data
:
[
{
displayValue
:
this
.
textDocument
,
value
:
Asc
.
section_footnote_RestartContinuous
},
{
displayValue
:
this
.
textSection
,
value
:
Asc
.
section_footnote_RestartEachSect
}
{
displayValue
:
this
.
textDocument
,
value
:
1
},
{
displayValue
:
this
.
textSection
,
value
:
0
}
]
});
this
.
cmbApply
.
setValue
(
Asc
.
section_footnote_RestartContinuous
);
this
.
cmbApply
.
setValue
(
1
);
this
.
btnApply
=
new
Common
.
UI
.
Button
({
el
:
$
(
'
#note-settings-btn-apply
'
)
...
...
@@ -251,11 +251,6 @@ define([
val
=
props
.
get_NumRestart
();
this
.
cmbNumbering
.
setValue
(
val
);
/*
val = props.get_ApplyTo();
this.cmbApply.setValue(val);
*/
}
},
...
...
@@ -270,13 +265,9 @@ define([
val
=
this
.
cmbFormat
.
getValue
();
props
.
put_NumFormat
(
val
);
props
.
put_NumStart
(
this
.
spnStart
.
getNumberValue
());
}
else
{
// props.set_Custom(val);
}
// props.put_ApplyTo(this.cmbApply.getValue());
return
{
props
:
props
,
custom
:
_
.
isEmpty
(
val
)
?
undefined
:
val
};
return
{
props
:
props
,
applyToAll
:
(
this
.
cmbApply
.
getValue
()
==
1
),
custom
:
_
.
isEmpty
(
val
)
?
undefined
:
val
};
},
onDlgBtnClick
:
function
(
event
)
{
...
...
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