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
1d789709
Commit
1d789709
authored
Apr 18, 2017
by
Julia Radzhabova
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
[DE] Use event asc_onSpellCheckInit instead of asc_getSpellCheckLanguages.
parent
c3443c63
Changes
5
Hide whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
23 additions
and
12 deletions
+23
-12
apps/common/main/lib/component/Menu.js
apps/common/main/lib/component/Menu.js
+1
-0
apps/documenteditor/main/app/controller/Main.js
apps/documenteditor/main/app/controller/Main.js
+18
-9
apps/documenteditor/main/app/view/DocumentHolder.js
apps/documenteditor/main/app/view/DocumentHolder.js
+3
-1
apps/documenteditor/main/app/view/Statusbar.js
apps/documenteditor/main/app/view/Statusbar.js
+1
-0
apps/documenteditor/sdk_dev_scripts.js
apps/documenteditor/sdk_dev_scripts.js
+0
-2
No files found.
apps/common/main/lib/component/Menu.js
View file @
1d789709
...
...
@@ -405,6 +405,7 @@ define([
item
.
off
(
'
click
'
).
off
(
'
toggle
'
);
item
.
remove
();
});
this
.
rendered
&&
this
.
cmpEl
.
find
(
'
.menu-scroll
'
).
off
(
'
click
'
).
remove
();
me
.
items
=
[];
},
...
...
apps/documenteditor/main/app/controller/Main.js
View file @
1d789709
...
...
@@ -105,7 +105,7 @@ define([
});
this
.
_state
=
{
isDisconnected
:
false
,
usersCount
:
1
,
fastCoauth
:
true
,
lostEditingRights
:
false
,
licenseWarning
:
false
};
this
.
languages
=
null
;
// Initialize viewport
if
(
!
Common
.
Utils
.
isBrowserSupported
()){
...
...
@@ -141,6 +141,8 @@ define([
this
.
api
.
asc_registerCallback
(
'
asc_onDocumentName
'
,
_
.
bind
(
this
.
onDocumentName
,
this
));
this
.
api
.
asc_registerCallback
(
'
asc_onPrintUrl
'
,
_
.
bind
(
this
.
onPrintUrl
,
this
));
this
.
api
.
asc_registerCallback
(
'
asc_onMeta
'
,
_
.
bind
(
this
.
onMeta
,
this
));
this
.
api
.
asc_registerCallback
(
'
asc_onSpellCheckInit
'
,
_
.
bind
(
this
.
loadLanguages
,
this
));
Common
.
NotificationCenter
.
on
(
'
api:disconnect
'
,
_
.
bind
(
this
.
onCoAuthoringDisconnect
,
this
));
Common
.
NotificationCenter
.
on
(
'
goback
'
,
_
.
bind
(
this
.
goBack
,
this
));
...
...
@@ -868,7 +870,7 @@ define([
toolbarController
.
createDelayedElements
();
documentHolderController
.
getView
(
'
DocumentHolder
'
).
createDelayedElements
();
me
.
load
Languages
();
me
.
set
Languages
();
var
shapes
=
me
.
api
.
asc_getPropertyEditorShapes
();
if
(
shapes
)
...
...
@@ -1655,15 +1657,15 @@ define([
}
},
loadLanguages
:
function
()
{
var
apiLangs
=
this
.
api
.
asc_getSpellCheckLanguages
(),
langs
=
[],
info
;
loadLanguages
:
function
(
apiLangs
)
{
var
langs
=
[],
info
;
_
.
each
(
apiLangs
,
function
(
lang
,
index
,
list
){
info
=
Common
.
util
.
LanguageInfo
.
getLocalLanguageName
(
lang
.
asc_getId
());
lang
=
parseInt
(
lang
);
info
=
Common
.
util
.
LanguageInfo
.
getLocalLanguageName
(
lang
);
langs
.
push
({
title
:
info
[
1
],
tip
:
info
[
0
],
code
:
lang
.
asc_getId
()
code
:
lang
});
},
this
);
...
...
@@ -1673,8 +1675,15 @@ define([
return
0
;
});
this
.
getApplication
().
getController
(
'
DocumentHolder
'
).
getView
(
'
DocumentHolder
'
).
setLanguages
(
langs
);
this
.
getApplication
().
getController
(
'
Statusbar
'
).
setLanguages
(
langs
);
this
.
languages
=
langs
;
window
.
styles_loaded
&&
this
.
setLanguages
();
},
setLanguages
:
function
()
{
if
(
this
.
languages
&&
this
.
languages
.
length
>
0
)
{
this
.
getApplication
().
getController
(
'
DocumentHolder
'
).
getView
(
'
DocumentHolder
'
).
setLanguages
(
this
.
languages
);
this
.
getApplication
().
getController
(
'
Statusbar
'
).
setLanguages
(
this
.
languages
);
}
},
onInsertTable
:
function
()
{
...
...
apps/documenteditor/main/app/view/DocumentHolder.js
View file @
1d789709
...
...
@@ -3119,7 +3119,9 @@ define([
setLanguages
:
function
(
langs
){
var
me
=
this
;
if
(
langs
&&
langs
.
length
>
0
)
{
if
(
langs
&&
langs
.
length
>
0
&&
me
.
langParaMenu
&&
me
.
langTableMenu
)
{
me
.
langParaMenu
.
menu
.
removeAll
();
me
.
langTableMenu
.
menu
.
removeAll
();
_
.
each
(
langs
,
function
(
lang
,
index
){
me
.
langParaMenu
.
menu
.
addItem
(
new
Common
.
UI
.
MenuItem
({
caption
:
lang
.
title
,
...
...
apps/documenteditor/main/app/view/Statusbar.js
View file @
1d789709
...
...
@@ -466,6 +466,7 @@ define([
/** coauthoring end **/
reloadLanguages
:
function
(
array
)
{
this
.
langMenu
.
removeAll
();
_
.
each
(
array
,
function
(
item
)
{
this
.
langMenu
.
addItem
({
iconCls
:
item
[
'
tip
'
],
...
...
apps/documenteditor/sdk_dev_scripts.js
View file @
1d789709
...
...
@@ -6,8 +6,6 @@ var sdk_dev_scrpipts = [
"
../../../../sdkjs/common/docscoapicommon.js
"
,
"
../../../../sdkjs/common/docscoapi.js
"
,
"
../../../../sdkjs/common/spellcheckapi.js
"
,
"
../../../../sdkjs/common/spellCheckLanguage.js
"
,
"
../../../../sdkjs/common/spellCheckLanguagesAll.js
"
,
"
../../../../sdkjs/common/apiCommon.js
"
,
"
../../../../sdkjs/common/SerializeCommonWordExcel.js
"
,
"
../../../../sdkjs/common/editorscommon.js
"
,
...
...
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