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
e258200a
Commit
e258200a
authored
Feb 07, 2017
by
Julia Radzhabova
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
[SSE] Fill format settings info.
parent
dacf2b95
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
16 additions
and
4 deletions
+16
-4
apps/spreadsheeteditor/main/app/controller/Toolbar.js
apps/spreadsheeteditor/main/app/controller/Toolbar.js
+4
-1
apps/spreadsheeteditor/main/app/view/FormatSettingsDialog.js
apps/spreadsheeteditor/main/app/view/FormatSettingsDialog.js
+12
-3
No files found.
apps/spreadsheeteditor/main/app/controller/Toolbar.js
View file @
e258200a
...
...
@@ -103,6 +103,7 @@ define([
fontsize
:
undefined
,
multiselect
:
false
,
sparklines_disabled
:
false
,
numformatinfo
:
undefined
,
numformattype
:
undefined
,
numformat
:
undefined
,
langId
:
undefined
...
...
@@ -846,6 +847,7 @@ define([
width
:
500
,
title
:
this
.
txtSorting
,
msg
:
this
.
txtExpandSort
,
buttons
:
[
{
caption
:
this
.
txtExpand
,
primary
:
true
,
value
:
'
expand
'
},
{
caption
:
this
.
txtSortSelected
,
primary
:
true
,
value
:
'
sort
'
},
'
cancel
'
],
...
...
@@ -927,7 +929,7 @@ define([
}
Common
.
NotificationCenter
.
trigger
(
'
edit:complete
'
,
me
.
toolbar
);
},
props
:
{
format
Type
:
me
.
_state
.
numformattype
,
format
:
me
.
_state
.
numformat
,
langId
:
value
}
props
:
{
format
:
me
.
_state
.
numformat
,
formatInfo
:
me
.
_state
.
numformatinfo
,
langId
:
value
}
})).
show
();
Common
.
NotificationCenter
.
trigger
(
'
edit:complete
'
,
this
.
toolbar
);
Common
.
component
.
Analytics
.
trackEvent
(
'
ToolBar
'
,
'
Number Format
'
);
...
...
@@ -1963,6 +1965,7 @@ define([
val
=
info
.
asc_getNumFormatInfo
();
if
(
val
)
{
this
.
_state
.
numformat
=
info
.
asc_getNumFormat
();
this
.
_state
.
numformatinfo
=
val
;
val
=
val
.
asc_getType
();
if
(
this
.
_state
.
numformattype
!==
val
)
{
toolbar
.
cmbNumberFormat
.
setValue
(
val
,
toolbar
.
txtCustom
);
...
...
apps/spreadsheeteditor/main/app/view/FormatSettingsDialog.js
View file @
e258200a
...
...
@@ -157,6 +157,7 @@ define([
this
.
api
=
options
.
api
;
this
.
handler
=
options
.
handler
;
this
.
props
=
options
.
props
;
this
.
_state
=
{
hasDecimal
:
false
,
hasNegative
:
false
,
hasSeparator
:
false
,
hasType
:
false
,
hasSymbols
:
false
,
hasCode
:
false
};
Common
.
Views
.
AdvancedSettingsWindow
.
prototype
.
initialize
.
call
(
this
,
this
.
options
);
...
...
@@ -258,15 +259,22 @@ define([
},
_setDefaults
:
function
(
props
)
{
if
(
props
)
{
if
(
props
&&
props
.
formatInfo
)
{
if
(
this
.
langId
)
this
.
langId
=
props
.
langId
;
this
.
cmbFormat
.
setValue
(
props
.
format
Type
,
this
.
txtCustom
);
this
.
cmbFormat
.
setValue
(
props
.
format
Info
.
asc_getType
()
,
this
.
txtCustom
);
if
((
props
.
format
Type
==
Asc
.
c_oAscNumFormatType
.
Custom
)
&&
props
.
format
)
if
((
props
.
format
Info
.
asc_getType
()
==
Asc
.
c_oAscNumFormatType
.
Custom
)
&&
props
.
format
)
this
.
CustomFormat
=
this
.
Format
=
props
.
format
;
this
.
onFormatSelect
(
this
.
cmbFormat
,
this
.
cmbFormat
.
getSelectedRecord
());
if
(
this
.
_state
.
hasDecimal
)
this
.
spnDecimal
.
setValue
(
props
.
formatInfo
.
asc_getDecimalPlaces
());
if
(
this
.
_state
.
hasSeparator
)
this
.
chSeparator
.
setValue
(
props
.
formatInfo
.
asc_getSeparator
());
if
(
this
.
_state
.
hasSymbols
)
this
.
cmbSymbols
.
setValue
(
props
.
formatInfo
.
asc_getSymbol
());
// for fraction - if props.format not in cmbType - setValue(this.txtCustom)
// for date/time - if props.format not in cmbType - setValue(this.api.asc_getLocaleExample(props.format, 37973))
// for cmbNegative - if props.format not in cmbNegative - setValue(this.api.asc_getLocaleExample(props.format))
...
...
@@ -459,6 +467,7 @@ define([
this
.
_typePanel
.
toggleClass
(
'
hidden
'
,
!
hasType
);
this
.
_symbolsPanel
.
toggleClass
(
'
hidden
'
,
!
hasSymbols
);
this
.
_codePanel
.
toggleClass
(
'
hidden
'
,
!
hasCode
);
this
.
_state
=
{
hasDecimal
:
hasDecimal
,
hasNegative
:
hasNegative
,
hasSeparator
:
hasSeparator
,
hasType
:
hasType
,
hasSymbols
:
hasSymbols
,
hasCode
:
hasCode
};
},
textTitle
:
'
Number Format
'
,
...
...
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