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
4ac766e8
Commit
4ac766e8
authored
Jan 17, 2017
by
Julia Radzhabova
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
[SSE] Use Ctrl+1 for opening FormatSettingsDialog.
parent
cf5b2946
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
31 additions
and
18 deletions
+31
-18
apps/spreadsheeteditor/main/app/controller/Toolbar.js
apps/spreadsheeteditor/main/app/controller/Toolbar.js
+31
-18
No files found.
apps/spreadsheeteditor/main/app/controller/Toolbar.js
View file @
4ac766e8
...
...
@@ -890,25 +890,31 @@ define([
if
(
this
.
api
)
this
.
api
.
asc_setCellFormat
(
record
.
format
);
}
else
{
var
me
=
this
,
value
=
Common
.
localStorage
.
getItem
(
"
sse-settings-reg-settings
"
);
value
=
(
value
!==
null
)
?
parseInt
(
value
)
:
((
me
.
toolbar
.
mode
.
lang
)
?
parseInt
(
Common
.
util
.
LanguageInfo
.
getLocalLanguageCode
(
me
.
toolbar
.
mode
.
lang
))
:
0x0409
);
(
new
SSE
.
Views
.
FormatSettingsDialog
({
api
:
me
.
api
,
handler
:
function
(
result
,
settings
)
{
if
(
settings
)
{
me
.
api
.
asc_setCellFormat
(
settings
.
format
);
}
Common
.
NotificationCenter
.
trigger
(
'
edit:complete
'
,
me
.
toolbar
);
},
props
:
{
formatType
:
me
.
_state
.
numformattype
,
langId
:
value
}
})).
show
();
this
.
onCustomNumberFormat
();
}
Common
.
NotificationCenter
.
trigger
(
'
edit:complete
'
,
this
.
toolbar
);
Common
.
component
.
Analytics
.
trackEvent
(
'
ToolBar
'
,
'
Number Format
'
);
},
onCustomNumberFormat
:
function
()
{
var
me
=
this
,
value
=
Common
.
localStorage
.
getItem
(
"
sse-settings-reg-settings
"
);
value
=
(
value
!==
null
)
?
parseInt
(
value
)
:
((
me
.
toolbar
.
mode
.
lang
)
?
parseInt
(
Common
.
util
.
LanguageInfo
.
getLocalLanguageCode
(
me
.
toolbar
.
mode
.
lang
))
:
0x0409
);
(
new
SSE
.
Views
.
FormatSettingsDialog
({
api
:
me
.
api
,
handler
:
function
(
result
,
settings
)
{
if
(
settings
)
{
me
.
api
.
asc_setCellFormat
(
settings
.
format
);
}
Common
.
NotificationCenter
.
trigger
(
'
edit:complete
'
,
me
.
toolbar
);
},
props
:
{
formatType
:
me
.
_state
.
numformattype
,
langId
:
value
}
})).
show
();
Common
.
NotificationCenter
.
trigger
(
'
edit:complete
'
,
this
.
toolbar
);
Common
.
component
.
Analytics
.
trackEvent
(
'
ToolBar
'
,
'
Number Format
'
);
},
onNumberFormatOpenBefore
:
function
(
combo
)
{
if
(
this
.
api
)
{
var
me
=
this
;
...
...
@@ -1289,6 +1295,13 @@ define([
if
(
me
.
editMode
&&
!
me
.
toolbar
.
mode
.
isEditMailMerge
&&
!
me
.
toolbar
.
mode
.
isEditDiagram
&&
!
me
.
api
.
isCellEdited
&&
!
me
.
_state
.
multiselect
)
me
.
onHyperlink
();
e
.
preventDefault
();
},
'
command+1,ctrl+1
'
:
function
(
e
)
{
if
(
me
.
editMode
&&
!
me
.
toolbar
.
mode
.
isEditMailMerge
&&
!
me
.
api
.
isCellEdited
&&
!
me
.
toolbar
.
cmbNumberFormat
.
isDisabled
())
{
me
.
onCustomNumberFormat
();
}
return
false
;
}
}
});
...
...
@@ -1528,8 +1541,8 @@ define([
});
var
is_cell_edited
=
(
state
==
Asc
.
c_oAscCellEditorState
.
editStart
);
(
is_cell_edited
)
?
Common
.
util
.
Shortcuts
.
suspendEvents
(
'
command+l, ctrl+l, command+shift+l, ctrl+shift+l, command+k, ctrl+k, alt+h
'
)
:
Common
.
util
.
Shortcuts
.
resumeEvents
(
'
command+l, ctrl+l, command+shift+l, ctrl+shift+l, command+k, ctrl+k, alt+h
'
);
(
is_cell_edited
)
?
Common
.
util
.
Shortcuts
.
suspendEvents
(
'
command+l, ctrl+l, command+shift+l, ctrl+shift+l, command+k, ctrl+k, alt+h
, command+1, ctrl+1
'
)
:
Common
.
util
.
Shortcuts
.
resumeEvents
(
'
command+l, ctrl+l, command+shift+l, ctrl+shift+l, command+k, ctrl+k, alt+h
, command+1, ctrl+1
'
);
if
(
is_cell_edited
)
{
toolbar
.
listStyles
.
suspendEvents
();
...
...
@@ -2582,10 +2595,10 @@ define([
var
left
=
toolbar
.
isCompactView
?
75
:
(
toolbar
.
mode
.
nativeApp
?
80
:
48
);
mask
.
css
(
'
left
'
,
left
+
'
px
'
);
mask
.
css
(
'
right
'
,
(
toolbar
.
isCompactView
?
0
:
45
)
+
'
px
'
);
Common
.
util
.
Shortcuts
.
suspendEvents
(
'
command+l, ctrl+l, command+shift+l, ctrl+shift+l, command+k, ctrl+k, command+alt+h, ctrl+alt+h
'
);
Common
.
util
.
Shortcuts
.
suspendEvents
(
'
command+l, ctrl+l, command+shift+l, ctrl+shift+l, command+k, ctrl+k, command+alt+h, ctrl+alt+h
, command+1, ctrl+1
'
);
}
else
{
mask
.
remove
();
Common
.
util
.
Shortcuts
.
resumeEvents
(
'
command+l, ctrl+l, command+shift+l, ctrl+shift+l, command+k, ctrl+k, command+alt+h, ctrl+alt+h
'
);
Common
.
util
.
Shortcuts
.
resumeEvents
(
'
command+l, ctrl+l, command+shift+l, ctrl+shift+l, command+k, ctrl+k, command+alt+h, ctrl+alt+h
, command+1, ctrl+1
'
);
}
},
...
...
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