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
681d032a
Commit
681d032a
authored
Jan 17, 2017
by
Julia Radzhabova
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
[SSE] Number format in the toolbar depends on regional settings.
parent
708af637
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
22 additions
and
180 deletions
+22
-180
apps/spreadsheeteditor/main/app/controller/Toolbar.js
apps/spreadsheeteditor/main/app/controller/Toolbar.js
+19
-3
apps/spreadsheeteditor/main/app/view/FileMenuPanels.js
apps/spreadsheeteditor/main/app/view/FileMenuPanels.js
+2
-2
apps/spreadsheeteditor/main/app/view/Toolbar.js
apps/spreadsheeteditor/main/app/view/Toolbar.js
+1
-175
No files found.
apps/spreadsheeteditor/main/app/controller/Toolbar.js
View file @
681d032a
...
...
@@ -103,7 +103,8 @@ define([
fontsize
:
undefined
,
multiselect
:
false
,
sparklines_disabled
:
false
,
numformattype
:
undefined
numformattype
:
undefined
,
langId
:
undefined
};
var
checkInsertAutoshape
=
function
(
e
,
action
)
{
...
...
@@ -910,8 +911,23 @@ define([
onNumberFormatOpenBefore
:
function
(
combo
)
{
if
(
this
.
api
)
{
var
me
=
this
,
info
=
me
.
api
.
asc_getCellInfo
();
var
me
=
this
;
var
value
=
Common
.
localStorage
.
getItem
(
"
sse-settings-reg-settings
"
);
value
=
(
value
!==
null
)
?
parseInt
(
value
)
:
((
this
.
toolbar
.
mode
.
lang
)
?
parseInt
(
Common
.
util
.
LanguageInfo
.
getLocalLanguageCode
(
this
.
toolbar
.
mode
.
lang
))
:
0x0409
);
if
(
this
.
_state
.
langId
!==
value
)
{
this
.
_state
.
langId
=
value
;
var
info
=
new
Asc
.
asc_CFormatCellsInfo
();
info
.
asc_setType
(
Asc
.
c_oAscNumFormatType
.
None
);
info
.
asc_setSymbol
(
this
.
_state
.
langId
);
var
arr
=
this
.
api
.
asc_getFormatCells
(
info
);
// all formats
me
.
toolbar
.
numFormatData
.
forEach
(
function
(
item
,
index
)
{
me
.
toolbar
.
numFormatData
[
index
].
format
=
arr
[
index
];
});
}
me
.
toolbar
.
numFormatData
.
forEach
(
function
(
item
,
index
)
{
item
.
exampleval
=
me
.
api
.
asc_getLocaleExample
(
item
.
format
);
});
...
...
apps/spreadsheeteditor/main/app/view/FileMenuPanels.js
View file @
681d032a
...
...
@@ -760,8 +760,8 @@ define([
info
.
asc_setType
(
Asc
.
c_oAscNumFormatType
.
None
);
info
.
asc_setSymbol
(
landId
);
var
arr
=
this
.
api
.
asc_getFormatCells
(
info
);
// all formats
text
=
this
.
api
.
asc_getLocaleExample
(
arr
[
2
],
1000.01
,
landId
);
text
=
text
+
'
'
+
this
.
api
.
asc_getLocaleExample
(
arr
[
4
],
(
new
Date
()).
getExcelDateWithTime
(),
landId
);
text
=
this
.
api
.
asc_getLocaleExample
(
arr
[
4
],
1000.01
,
landId
);
text
=
text
+
'
'
+
this
.
api
.
asc_getLocaleExample
(
arr
[
5
],
(
new
Date
()).
getExcelDateWithTime
(),
landId
);
text
=
text
+
'
'
+
this
.
api
.
asc_getLocaleExample
(
arr
[
6
],
(
new
Date
()).
getExcelDateWithTime
(),
landId
);
}
$
(
'
#fms-lbl-reg-settings
'
).
text
(
_
.
isEmpty
(
text
)
?
''
:
this
.
strRegSettingsEx
+
text
);
...
...
apps/spreadsheeteditor/main/app/view/Toolbar.js
View file @
681d032a
...
...
@@ -692,7 +692,7 @@ define([
items
:
[
{
caption
:
me
.
txtDollar
,
value
:
me
.
ascFormatOptions
.
Accounting
value
:
'
_($* #,##0.00_);_($* (#,##0.00);_($* "-"??_);_(@_)
'
},
{
caption
:
me
.
txtEuro
,
...
...
@@ -1531,180 +1531,6 @@ define([
});
}
// var formatTemplate = _.template('<a id="<%= id %>" style="white-space: normal;" tabindex="-1" type="menuitem"><%= caption %><span style="float: right; color: silver;"><%= options.tplval ? options.tplval : options.value %></span></a>');
// this.btnNumberFormat.setMenu( new Common.UI.Menu({
// style: 'margin-left: -1px;',
// items: [
// {
// caption : this.txtGeneral,
// value : this.ascFormatOptions.General
// },
// {
// caption : this.txtNumber,
// value : this.ascFormatOptions.Number
// },
// {
// caption : this.txtInteger,
// value : '#0'
// },
// {
// caption : this.txtScientific,
// value : this.ascFormatOptions.Scientific
// },
// {
// caption : this.txtAccounting,
// menu : new Common.UI.Menu({
// style: 'min-width: 120px;',
// menuAlign: 'tl-tr',
// items : [
// {
// caption : this.txtDollar,
// value : this.ascFormatOptions.Accounting
// },
// {
// caption : this.txtEuro,
// value : '_(€* #,##0.00_);_(€* (#,##0.00);_(€* "-"??_);_(@_)'
// },
// {
// caption : this.txtPound,
// value : '_(£* #,##0.00_);_(£* (#,##0.00);_(£* "-"??_);_(@_)'
// },
// {
// caption : this.txtRouble,
// value : '_-* #,##0.00[$р.-419]_-;-* #,##0.00[$р.-419]_-;_-* "-"??[$р.-419]_-;_-@_-'
// },
// {
// caption : this.txtYen,
// value : '_(¥* #,##0.00_);_(¥* (#,##0.00);_(¥* "-"??_);_(@_)'
// }
// ]
// })
// },
// {
// caption : this.txtCurrency,
// menu : new Common.UI.Menu({
// style: 'min-width: 120px;',
// menuAlign: 'tl-tr',
// items : [
// {
// caption : this.txtDollar,
// value : this.ascFormatOptions.Currency
// },
// {
// caption : this.txtEuro,
// value : '€#,##0.00'
// },
// {
// caption : this.txtPound,
// value : '£#,##0.00'
// },
// {
// caption : this.txtRouble,
// value : '#,##0.00"р."'
// },
// {
// caption : this.txtYen,
// value : '¥#,##0.00'
// }
// ]
// })
// },
// {
// caption : this.txtDate,
// menu : new Common.UI.Menu({
// style: 'min-width: 200px;',
// menuAlign: 'tl-tr',
// items: [
// {
// caption : '07-24-88',
// value : 'MM-dd-yy',
// template: formatTemplate
// },
// {
// caption : '07-24-1988',
// value : 'MM-dd-yyyy',
// template: formatTemplate
// },
// {
// caption : '24-07-88',
// value : 'dd-MM-yy',
// template: formatTemplate
// },
// {
// caption : '24-07-1988',
// value : 'dd-MM-yyyy',
// template: formatTemplate
// },
// {
// caption : '24-Jul-1988',
// value : 'dd-MMM-yyyy',
// template: formatTemplate
// },
// {
// caption : '24-Jul',
// value : 'dd-MMM',
// template: formatTemplate
// },
// {
// caption : 'Jul-88',
// value : 'MMM-yy',
// template: formatTemplate
// }
// ]
// })
// },
// {
// caption : this.txtTime,
// menu : new Common.UI.Menu({
// style: 'min-width: 200px;',
// menuAlign: 'tl-tr',
// showSeparator : false,
// items: [
// {
// caption : '10:56',
// value : 'HH:mm',
// template: formatTemplate
// },
// {
// caption : '21:56:00',
// value : 'HH:MM:ss',
// template: formatTemplate
// },
// {
// caption : '05:56 AM',
// tplval : 'hh:mm tt',
// value : 'hh:mm AM/PM',
// template: formatTemplate
// },
// {
// caption : '05:56:00 AM',
// tplval : 'hh:mm:ss tt',
// value : 'hh:mm:ss AM/PM',
// template: formatTemplate
// },
// {
// caption : '38:56:00',
// value : '[h]:mm:ss',
// template: formatTemplate
// }
// ]
// })
// },
// {
// caption : this.txtPercentage,
// value : this.ascFormatOptions.Percentage
// },
// {
// caption : this.txtFraction,
// value : this.ascFormatOptions.Fraction
// },
// {
// caption : this.txtText,
// value : this.ascFormatOptions.Text
// }
// ]
// }));
this
.
mnuInsertChartPicker
=
new
Common
.
UI
.
DataView
({
el
:
$
(
'
#id-toolbar-menu-insertchart
'
),
parentMenu
:
this
.
btnInsertChart
.
menu
,
...
...
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