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
973b5531
Commit
973b5531
authored
Jan 19, 2017
by
Julia Radzhabova
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
[SSE] FormatSettingsDialog: add custom format to the list of formats.
parent
ad8c469c
Changes
2
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
14 additions
and
2 deletions
+14
-2
apps/spreadsheeteditor/main/app/controller/Toolbar.js
apps/spreadsheeteditor/main/app/controller/Toolbar.js
+3
-1
apps/spreadsheeteditor/main/app/view/FormatSettingsDialog.js
apps/spreadsheeteditor/main/app/view/FormatSettingsDialog.js
+11
-1
No files found.
apps/spreadsheeteditor/main/app/controller/Toolbar.js
View file @
973b5531
...
...
@@ -104,6 +104,7 @@ define([
multiselect
:
false
,
sparklines_disabled
:
false
,
numformattype
:
undefined
,
numformat
:
undefined
,
langId
:
undefined
};
...
...
@@ -908,7 +909,7 @@ define([
}
Common
.
NotificationCenter
.
trigger
(
'
edit:complete
'
,
me
.
toolbar
);
},
props
:
{
formatType
:
me
.
_state
.
numformattype
,
langId
:
value
}
props
:
{
formatType
:
me
.
_state
.
numformattype
,
format
:
me
.
_state
.
numformat
,
langId
:
value
}
})).
show
();
Common
.
NotificationCenter
.
trigger
(
'
edit:complete
'
,
this
.
toolbar
);
Common
.
component
.
Analytics
.
trackEvent
(
'
ToolBar
'
,
'
Number Format
'
);
...
...
@@ -1935,6 +1936,7 @@ define([
}
val
=
info
.
asc_getNumFormatType
();
this
.
_state
.
numformat
=
info
.
asc_getNumFormat
();
if
(
this
.
_state
.
numformattype
!==
val
)
{
toolbar
.
cmbNumberFormat
.
setValue
(
val
,
toolbar
.
txtCustom
);
this
.
_state
.
numformattype
=
val
;
...
...
apps/spreadsheeteditor/main/app/view/FormatSettingsDialog.js
View file @
973b5531
...
...
@@ -162,6 +162,7 @@ define([
this
.
FormatType
=
Asc
.
c_oAscNumFormatType
.
General
;
this
.
Format
=
"
General
"
;
this
.
CustomFormat
=
null
;
},
render
:
function
()
{
...
...
@@ -262,6 +263,9 @@ define([
this
.
langId
=
props
.
langId
;
this
.
cmbFormat
.
setValue
(
props
.
formatType
,
this
.
txtCustom
);
if
((
props
.
formatType
==
Asc
.
c_oAscNumFormatType
.
Custom
)
&&
props
.
format
)
this
.
CustomFormat
=
this
.
Format
=
props
.
format
;
this
.
onFormatSelect
(
this
.
cmbFormat
,
this
.
cmbFormat
.
getSelectedRecord
());
// 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))
...
...
@@ -433,10 +437,16 @@ define([
info
.
asc_setSymbol
(
this
.
langId
);
var
formatsarr
=
this
.
api
.
asc_getFormatCells
(
info
),
data
=
[];
data
=
[],
isCustom
=
(
this
.
CustomFormat
)
?
true
:
false
;
formatsarr
.
forEach
(
function
(
item
)
{
data
.
push
({
value
:
item
,
displayValue
:
item
});
if
(
me
.
CustomFormat
==
item
)
isCustom
=
false
;
});
if
(
isCustom
)
{
data
.
push
({
value
:
this
.
CustomFormat
,
displayValue
:
this
.
CustomFormat
});
}
this
.
cmbCode
.
setData
(
data
);
this
.
cmbCode
.
setValue
(
this
.
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