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
e93ec604
Commit
e93ec604
authored
Dec 26, 2016
by
Julia Radzhabova
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
[DE] Insert custom footnotes.
parent
e1049695
Changes
2
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
26 additions
and
29 deletions
+26
-29
apps/documenteditor/main/app/controller/Toolbar.js
apps/documenteditor/main/app/controller/Toolbar.js
+3
-3
apps/documenteditor/main/app/view/NoteSettingsDialog.js
apps/documenteditor/main/app/view/NoteSettingsDialog.js
+23
-26
No files found.
apps/documenteditor/main/app/controller/Toolbar.js
View file @
e93ec604
...
...
@@ -2014,10 +2014,10 @@ define([
handler
:
function
(
result
,
settings
)
{
if
(
settings
)
{
if
(
result
==
'
insert
'
)
{
me
.
api
.
asc_SetFootnoteProps
(
settings
);
me
.
api
.
asc_AddFootnote
();
me
.
api
.
asc_SetFootnoteProps
(
settings
.
props
);
me
.
api
.
asc_AddFootnote
(
settings
.
custom
);
}
else
if
(
result
==
'
apply
'
)
{
me
.
api
.
asc_SetFootnoteProps
(
settings
);
me
.
api
.
asc_SetFootnoteProps
(
settings
.
props
);
}
}
Common
.
NotificationCenter
.
trigger
(
'
edit:complete
'
,
me
.
toolbar
);
...
...
apps/documenteditor/main/app/view/NoteSettingsDialog.js
View file @
e93ec604
...
...
@@ -123,7 +123,7 @@ define([
'
</div>
'
,
'
<div class="footer center">
'
,
'
<button class="btn normal dlg-btn primary" result="insert" style="margin-right: 10px; width: 86px;">
'
+
me
.
textInsert
+
'
</button>
'
,
'
<button class="btn normal dlg-btn primary" result="apply" style="margin-right: 10px; width: 86px;">
'
+
me
.
textApply
+
'
</button>
'
,
'
<button
id="note-settings-btn-apply"
class="btn normal dlg-btn primary" result="apply" style="margin-right: 10px; width: 86px;">
'
+
me
.
textApply
+
'
</button>
'
,
'
<button class="btn normal dlg-btn" result="cancel" style="width: 86px;">
'
+
me
.
textCancel
+
'
</button>
'
,
'
</div>
'
].
join
(
''
)
...
...
@@ -149,11 +149,11 @@ define([
menuStyle
:
'
min-width: 150px;
'
,
editable
:
false
,
data
:
[
{
displayValue
:
this
.
textPageBottom
,
value
:
Asc
.
c_oAscFootnotePos
.
section_footnote_Pos
PageBottom
},
{
displayValue
:
this
.
textTextBottom
,
value
:
Asc
.
c_oAscFootnotePos
.
section_footnote_Pos
BeneathText
}
{
displayValue
:
this
.
textPageBottom
,
value
:
Asc
.
c_oAscFootnotePos
.
PageBottom
},
{
displayValue
:
this
.
textTextBottom
,
value
:
Asc
.
c_oAscFootnotePos
.
BeneathText
}
]
});
this
.
cmbFootnote
.
setValue
(
Asc
.
c_oAscFootnotePos
.
section_footnote_Pos
PageBottom
);
this
.
cmbFootnote
.
setValue
(
Asc
.
c_oAscFootnotePos
.
PageBottom
);
this
.
cmbFormat
=
new
Common
.
UI
.
ComboBox
({
el
:
$
(
'
#note-settings-combo-format
'
),
...
...
@@ -161,11 +161,11 @@ define([
menuStyle
:
'
min-width: 150px;
'
,
editable
:
false
,
data
:
[
{
displayValue
:
'
1, 2, 3,...
'
,
value
:
1
,
maskExp
:
/
[
0-9
]
/
,
defValue
:
1
},
{
displayValue
:
'
a, b, c,...
'
,
value
:
5
,
maskExp
:
/
[
a-z
]
/
,
defValue
:
'
a
'
},
{
displayValue
:
'
A, B, C,...
'
,
value
:
4
,
maskExp
:
/
[
A-Z
]
/
,
defValue
:
'
A
'
},
{
displayValue
:
'
i, ii, iii,...
'
,
value
:
7
,
maskExp
:
/
[
ivxlcdm
]
/
,
defValue
:
'
i
'
},
{
displayValue
:
'
I, II, III,...
'
,
value
:
3
,
maskExp
:
/
[
IVXLCDM
]
/
,
defValue
:
'
I
'
}
{
displayValue
:
'
1, 2, 3,...
'
,
value
:
c_oAscNumberingFormat
.
Decimal
,
maskExp
:
/
[
0-9
]
/
,
defValue
:
1
},
{
displayValue
:
'
a, b, c,...
'
,
value
:
c_oAscNumberingFormat
.
LowerLetter
,
maskExp
:
/
[
a-z
]
/
,
defValue
:
'
a
'
},
{
displayValue
:
'
A, B, C,...
'
,
value
:
c_oAscNumberingFormat
.
UpperLetter
,
maskExp
:
/
[
A-Z
]
/
,
defValue
:
'
A
'
},
{
displayValue
:
'
i, ii, iii,...
'
,
value
:
c_oAscNumberingFormat
.
LowerRoman
,
maskExp
:
/
[
ivxlcdm
]
/
,
defValue
:
'
i
'
},
{
displayValue
:
'
I, II, III,...
'
,
value
:
c_oAscNumberingFormat
.
UpperRoman
,
maskExp
:
/
[
IVXLCDM
]
/
,
defValue
:
'
I
'
}
]
});
this
.
cmbFormat
.
setValue
(
this
.
FormatType
);
...
...
@@ -190,12 +190,12 @@ define([
menuStyle
:
'
min-width: 150px;
'
,
editable
:
false
,
data
:
[
{
displayValue
:
this
.
textContinue
,
value
:
Asc
.
c_oAscFootnoteRestart
.
section_footnote_Restart
Continuous
},
{
displayValue
:
this
.
textEachSection
,
value
:
Asc
.
c_oAscFootnoteRestart
.
section_footnote_Restart
EachSect
},
{
displayValue
:
this
.
textEachPage
,
value
:
Asc
.
c_oAscFootnoteRestart
.
section_footnote_Restart
EachPage
}
{
displayValue
:
this
.
textContinue
,
value
:
Asc
.
c_oAscFootnoteRestart
.
Continuous
},
{
displayValue
:
this
.
textEachSection
,
value
:
Asc
.
c_oAscFootnoteRestart
.
EachSect
},
{
displayValue
:
this
.
textEachPage
,
value
:
Asc
.
c_oAscFootnoteRestart
.
EachPage
}
]
});
this
.
cmbNumbering
.
setValue
(
Asc
.
c_oAscFootnoteRestart
.
section_footnote_Restart
Continuous
);
this
.
cmbNumbering
.
setValue
(
Asc
.
c_oAscFootnoteRestart
.
Continuous
);
this
.
txtCustom
=
new
Common
.
UI
.
InputField
({
el
:
$
(
'
#note-settings-txt-custom
'
),
...
...
@@ -207,6 +207,7 @@ define([
}).
on
(
'
changing
'
,
function
(
input
,
value
)
{
me
.
cmbFormat
.
setDisabled
(
value
.
length
>
0
);
me
.
spnStart
.
setDisabled
(
value
.
length
>
0
);
me
.
btnApply
.
setDisabled
(
value
.
length
>
0
);
});
this
.
cmbApply
=
new
Common
.
UI
.
ComboBox
({
...
...
@@ -221,6 +222,10 @@ define([
});
this
.
cmbApply
.
setValue
(
Asc
.
section_footnote_RestartContinuous
);
this
.
btnApply
=
new
Common
.
UI
.
Button
({
el
:
$
(
'
#note-settings-btn-apply
'
)
});
this
.
afterRender
();
},
...
...
@@ -248,11 +253,6 @@ define([
this
.
cmbNumbering
.
setValue
(
val
);
/*
val = props.get_Custom();
this.txtCustom.setValue(val);
this.cmbFormat.setDisabled(!_.isEmpty(val));
this.spnStart.setDisabled(!_.isEmpty(val));
val = props.get_ApplyTo();
this.cmbApply.setValue(val);
*/
...
...
@@ -269,17 +269,14 @@ define([
if
(
_
.
isEmpty
(
val
))
{
val
=
this
.
cmbFormat
.
getValue
();
props
.
put_NumFormat
(
val
);
// if (val==1)
props
.
put_NumStart
(
this
.
spnStart
.
getNumberValue
());
// else
// props.put_NumStart(this.txtStart.getValue());
}
else
{
// props.set_Custom(val);
}
// props.put_ApplyTo(this.cmbApply.getValue());
return
props
;
return
{
props
:
props
,
custom
:
_
.
isEmpty
(
val
)
?
undefined
:
val
}
;
},
onDlgBtnClick
:
function
(
event
)
{
...
...
@@ -303,19 +300,19 @@ define([
var
me
=
this
;
switch
(
record
.
value
)
{
case
3
:
// I, II, III, ...
case
c_oAscNumberingFormat
.
UpperRoman
:
// I, II, III, ...
this
.
spnStart
.
options
.
toCustomFormat
=
this
.
_10toRome
;
this
.
spnStart
.
options
.
fromCustomFormat
=
this
.
_Rometo10
;
break
;
case
7
:
// i, ii, iii, ...
case
c_oAscNumberingFormat
.
LowerRoman
:
// i, ii, iii, ...
this
.
spnStart
.
options
.
toCustomFormat
=
function
(
value
)
{
return
me
.
_10toRome
(
value
).
toLocaleLowerCase
();
};
this
.
spnStart
.
options
.
fromCustomFormat
=
function
(
value
)
{
return
me
.
_Rometo10
(
value
.
toLocaleUpperCase
());
};
break
;
case
4
:
// A, B, C, ...
case
c_oAscNumberingFormat
.
UpperLetter
:
// A, B, C, ...
this
.
spnStart
.
options
.
toCustomFormat
=
this
.
_10toS
;
this
.
spnStart
.
options
.
fromCustomFormat
=
this
.
_Sto10
;
break
;
case
5
:
// a, b, c, ...
case
c_oAscNumberingFormat
.
LowerLetter
:
// a, b, c, ...
this
.
spnStart
.
options
.
toCustomFormat
=
function
(
value
)
{
return
me
.
_10toS
(
value
).
toLocaleLowerCase
();
};
this
.
spnStart
.
options
.
fromCustomFormat
=
function
(
value
)
{
return
me
.
_Sto10
(
value
.
toLocaleUpperCase
());
};
break
;
...
...
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