Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
S
sdkjs
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
sdkjs
Commits
df6949da
Commit
df6949da
authored
Oct 13, 2016
by
Alexey Golubev
Browse files
Options
Browse Files
Download
Plain Diff
Merge branch 'hotfix/v4.1.5'
parents
7adfe8a5
cef6dfae
Changes
12
Hide whitespace changes
Inline
Side-by-side
Showing
12 changed files
with
84 additions
and
20 deletions
+84
-20
build/build-desktop.bat
build/build-desktop.bat
+7
-7
cell/Local/api.js
cell/Local/api.js
+2
-0
cell/api.js
cell/api.js
+3
-3
common/Drawings/Format/Image.js
common/Drawings/Format/Image.js
+1
-1
common/Drawings/WorkEvents.js
common/Drawings/WorkEvents.js
+1
-1
common/Local/common.js
common/Local/common.js
+12
-0
common/apiBase.js
common/apiBase.js
+11
-2
common/text_input.js
common/text_input.js
+27
-0
slide/Editor/Format/Presentation.js
slide/Editor/Format/Presentation.js
+1
-0
slide/Local/api.js
slide/Local/api.js
+2
-0
slide/api.js
slide/api.js
+14
-3
word/api.js
word/api.js
+3
-3
No files found.
build/build-desktop.bat
View file @
df6949da
...
...
@@ -3,15 +3,15 @@ call npm install -g grunt-cli
call
npm
install
rem call grunt --level=WHITESPACE_ONLY --desktop=true --formatting=PRETTY_PRINT
call
grunt
-
-level
=
ADVANCED
-
-desktop
=
true
copy
..\word\sdk
-all
.js ..\..\core\build\jsdesktop\word\sdk
-all
.js
copy
..\slide\sdk
-all
.js ..\..\core\build\jsdesktop\slide\sdk
-all
.js
copy
..\cell\sdk
-all
.js ..\..\core\build\jsdesktop\cell\sdk
-all
.js
copy
..\word\sdk
-all
.js ..\..\core\build\jsdesktop\
sdkjs\
word\sdk
-all
.js
copy
..\slide\sdk
-all
.js ..\..\core\build\jsdesktop\s
dkjs\s
lide\sdk
-all
.js
copy
..\cell\sdk
-all
.js ..\..\core\build\jsdesktop\
sdkjs\
cell\sdk
-all
.js
copy
..\word\sdk
-all-min
.js ..\..\core\build\jsdesktop\word\sdk
-all-min
.js
copy
..\slide\sdk
-all-min
.js ..\..\core\build\jsdesktop\slide\sdk
-all-min
.js
copy
..\cell\sdk
-all-min
.js ..\..\core\build\jsdesktop\cell\sdk
-all-min
.js
copy
..\word\sdk
-all-min
.js ..\..\core\build\jsdesktop\
sdkjs\
word\sdk
-all-min
.js
copy
..\slide\sdk
-all-min
.js ..\..\core\build\jsdesktop\s
dkjs\s
lide\sdk
-all-min
.js
copy
..\cell\sdk
-all-min
.js ..\..\core\build\jsdesktop\
sdkjs\
cell\sdk
-all-min
.js
copy
..\common\Native\native.js ..\..\core\build\jsdesktop\common\Native\native.js
copy
..\common\Native\native.js ..\..\core\build\jsdesktop\
sdkjs\
common\Native\native.js
copy
..\word\sdk
-all
.js ..\..\core
-ext
\desktop
-sdk-wrapper
\test\src\build\win_64\Debug\Local\editors\sdkjs\word\sdk
-all
.js
copy
..\slide\sdk
-all
.js ..\..\core
-ext
\desktop
-sdk-wrapper
\test\src\build\win_64\Debug\Local\editors\sdkjs\slide\sdk
-all
.js
...
...
cell/Local/api.js
View file @
df6949da
...
...
@@ -53,6 +53,8 @@ var c_oAscError = Asc.c_oAscError;
{
this
.
asc_registerCallback
(
'
asc_onDocumentContentReady
'
,
function
(){
DesktopOfflineUpdateLocalName
(
window
[
"
Asc
"
][
"
editor
"
]);
setTimeout
(
function
(){
window
[
"
UpdateInstallPlugins
"
]();},
10
);
});
window
[
"
AscDesktopEditor
"
][
"
LocalStartOpen
"
]();
...
...
cell/api.js
View file @
df6949da
...
...
@@ -456,7 +456,7 @@ var editor;
spreadsheet_api
.
prototype
.
asc_Copy
=
function
()
{
if
(
window
[
"
AscDesktopEditor
"
])
{
window
[
"
AscDesktopEditor
"
][
"
Copy
"
](
);
window
[
"
asc_desktop_copypaste
"
](
this
,
"
Copy
"
);
return
true
;
}
return
AscCommon
.
g_clipboardBase
.
Button_Copy
();
...
...
@@ -465,7 +465,7 @@ var editor;
spreadsheet_api
.
prototype
.
asc_Paste
=
function
()
{
if
(
window
[
"
AscDesktopEditor
"
])
{
window
[
"
AscDesktopEditor
"
][
"
Paste
"
](
);
window
[
"
asc_desktop_copypaste
"
](
this
,
"
Paste
"
);
return
true
;
}
if
(
!
AscCommon
.
g_clipboardBase
.
IsWorking
())
{
...
...
@@ -477,7 +477,7 @@ var editor;
spreadsheet_api
.
prototype
.
asc_Cut
=
function
()
{
if
(
window
[
"
AscDesktopEditor
"
])
{
window
[
"
AscDesktopEditor
"
][
"
Cut
"
](
);
window
[
"
asc_desktop_copypaste
"
](
this
,
"
Cut
"
);
return
true
;
}
return
AscCommon
.
g_clipboardBase
.
Button_Cut
();
...
...
common/Drawings/Format/Image.js
View file @
df6949da
...
...
@@ -575,7 +575,7 @@ CImageShape.prototype.draw = function(graphics, transform)
graphics
.
SetIntegerGrid
(
false
);
graphics
.
transform3
(
_transform
,
false
);
var
shape_drawer
=
new
AscCommon
.
CShapeDrawer
();
if
(
this
.
pen
||
this
.
brush
)
if
(
this
.
getObjectType
()
!==
AscDFH
.
historyitem_type_OleObject
&&
(
this
.
pen
||
this
.
brush
)
)
{
shape_drawer
.
fromShape2
(
this
,
graphics
,
this
.
spPr
.
geometry
);
shape_drawer
.
draw
(
this
.
spPr
.
geometry
);
...
...
common/Drawings/WorkEvents.js
View file @
df6949da
...
...
@@ -2021,7 +2021,7 @@
if
(
this
.
HtmlPage
.
m_oApi
.
isMobileVersion
)
{
var
_w
=
this
.
HtmlPage
.
m_oEditor
.
HtmlElement
.
width
;
if
(
this
.
bIsRetinaSupport
)
if
(
this
.
HtmlPage
.
bIsRetinaSupport
)
{
_w
>>=
1
;
}
...
...
common/Local/common.js
View file @
df6949da
...
...
@@ -199,6 +199,7 @@ window["NativeCorrectImageUrlOnPaste"] = function(url)
window
[
"
UpdateInstallPlugins
"
]
=
function
()
{
var
_plugins
=
JSON
.
parse
(
window
[
"
AscDesktopEditor
"
][
"
GetInstallPlugins
"
]());
_plugins
[
"
url
"
]
=
_plugins
[
"
url
"
].
replace
(
"
"
,
"
%20
"
);
var
_editor
=
window
[
"
Asc
"
][
"
editor
"
]
?
window
[
"
Asc
"
][
"
editor
"
]
:
window
.
editor
;
_editor
.
sendEvent
(
"
asc_onPluginsInit
"
,
_plugins
);
};
...
...
@@ -232,6 +233,17 @@ window["asc_initAdvancedOptions"] = function(_code)
_editor
.
_onNeedParams
(
undefined
,
(
_code
==
90
||
_code
==
91
)
?
true
:
undefined
);
};
// copy/paste focus error!!!
window
[
"
asc_desktop_copypaste
"
]
=
function
(
_api
,
_method
)
{
var
bIsFocus
=
_api
.
asc_IsFocus
();
if
(
!
bIsFocus
)
_api
.
asc_enableKeyEvents
(
true
);
window
[
"
AscDesktopEditor
"
][
_method
]();
if
(
!
bIsFocus
)
_api
.
asc_enableKeyEvents
(
false
);
}
// меняем среду
//AscBrowser.isSafari = false;
//AscBrowser.isSafariMacOs = false;
...
...
common/apiBase.js
View file @
df6949da
...
...
@@ -772,8 +772,11 @@
baseEditorsApi
.
prototype
.
asc_loadLocalImageAndAction
=
function
(
sLocalImage
,
fCallback
)
{
this
.
ImageLoader
.
LoadImage
(
AscCommon
.
getFullImageSrc2
(
sLocalImage
),
1
);
this
.
asc_replaceLoadImageCallback
(
fCallback
);
var
_loadedUrl
=
this
.
ImageLoader
.
LoadImage
(
AscCommon
.
getFullImageSrc2
(
sLocalImage
),
1
);
if
(
_loadedUrl
!=
null
)
fCallback
(
_loadedUrl
);
else
this
.
asc_replaceLoadImageCallback
(
fCallback
);
};
baseEditorsApi
.
prototype
.
asc_checkImageUrlAndAction
=
function
(
sImageUrl
,
fCallback
)
...
...
@@ -803,6 +806,9 @@
baseEditorsApi
.
prototype
.
asc_addOleObject
=
function
(
oPluginData
)
{
if
(
this
.
isViewMode
){
return
;
}
Asc
.
CPluginData_wrap
(
oPluginData
);
var
oThis
=
this
;
var
sImgSrc
=
oPluginData
.
getAttribute
(
"
imgSrc
"
);
...
...
@@ -826,6 +832,9 @@
baseEditorsApi
.
prototype
.
asc_editOleObject
=
function
(
oPluginData
)
{
if
(
this
.
isViewMode
){
return
;
}
Asc
.
CPluginData_wrap
(
oPluginData
);
var
oThis
=
this
;
var
bResize
=
oPluginData
.
getAttribute
(
"
resize
"
);
...
...
common/text_input.js
View file @
df6949da
...
...
@@ -160,6 +160,8 @@
// еще один режим для ie & edge
this
.
IsUseInputEventOnlyWithCtx
=
(
AscCommon
.
AscBrowser
.
isIE
)
?
true
:
false
;
this
.
IsInitialInputContext
=
false
;
this
.
IsDisableKeyPress
=
false
;
}
CTextInput
.
prototype
=
...
...
@@ -234,14 +236,32 @@
var
oThis
=
this
;
this
.
HtmlArea
[
"
onkeydown
"
]
=
function
(
e
)
{
if
(
AscCommon
.
AscBrowser
.
isSafariMacOs
)
{
var
cmdButton
=
(
e
.
ctrlKey
||
e
.
metaKey
)
?
true
:
false
;
var
buttonCode
=
((
e
.
keyCode
==
67
)
||
(
e
.
keyCode
==
88
)
||
(
e
.
keyCode
==
86
));
if
(
cmdButton
&&
buttonCode
)
oThis
.
IsDisableKeyPress
=
true
;
else
oThis
.
IsDisableKeyPress
=
false
;
}
return
oThis
.
onKeyDown
(
e
);
};
this
.
HtmlArea
[
"
onkeypress
"
]
=
function
(
e
)
{
if
(
oThis
.
IsDisableKeyPress
==
true
)
{
// macOS Sierra send keypress before copy event
oThis
.
IsDisableKeyPress
=
false
;
var
cmdButton
=
(
e
.
ctrlKey
||
e
.
metaKey
)
?
true
:
false
;
if
(
cmdButton
)
return
;
}
return
oThis
.
onKeyPress
(
e
);
};
this
.
HtmlArea
[
"
onkeyup
"
]
=
function
(
e
)
{
oThis
.
IsDisableKeyPress
=
false
;
return
oThis
.
onKeyUp
(
e
);
};
...
...
@@ -1529,6 +1549,13 @@
this
.
InterfaceEnableKeyEvents
=
value
;
if
(
true
==
this
.
InterfaceEnableKeyEvents
)
{
if
(
document
.
activeElement
)
{
var
_id
=
document
.
activeElement
.
id
;
if
(
_id
==
"
area_id
"
||
_id
==
"
plugin_iframe
"
)
return
;
}
this
.
HtmlArea
.
focus
();
}
},
...
...
slide/Editor/Format/Presentation.js
View file @
df6949da
...
...
@@ -5100,6 +5100,7 @@ CPresentation.prototype =
return
true
;
}
}
this
.
Document_UpdateInterfaceState
();
}
},
...
...
slide/Local/api.js
View file @
df6949da
...
...
@@ -42,6 +42,8 @@ Asc['asc_docs_api'].prototype._OfflineAppDocumentStartLoad = function()
{
this
.
asc_registerCallback
(
'
asc_onDocumentContentReady
'
,
function
(){
DesktopOfflineUpdateLocalName
(
editor
);
setTimeout
(
function
(){
window
[
"
UpdateInstallPlugins
"
]();},
10
);
});
AscCommon
.
History
.
UserSaveMode
=
true
;
...
...
slide/api.js
View file @
df6949da
...
...
@@ -1824,7 +1824,7 @@ background-repeat: no-repeat;\
{
if
(
window
[
"
AscDesktopEditor
"
])
{
window
[
"
AscDesktopEditor
"
][
"
Copy
"
](
);
window
[
"
asc_desktop_copypaste
"
](
this
,
"
Copy
"
);
return
true
;
}
return
AscCommon
.
g_clipboardBase
.
Button_Copy
();
...
...
@@ -1837,7 +1837,7 @@ background-repeat: no-repeat;\
{
if
(
window
[
"
AscDesktopEditor
"
])
{
window
[
"
AscDesktopEditor
"
][
"
Cut
"
](
);
window
[
"
asc_desktop_copypaste
"
](
this
,
"
Cut
"
);
return
true
;
}
return
AscCommon
.
g_clipboardBase
.
Button_Cut
();
...
...
@@ -1846,7 +1846,7 @@ background-repeat: no-repeat;\
{
if
(
window
[
"
AscDesktopEditor
"
])
{
window
[
"
AscDesktopEditor
"
][
"
Paste
"
](
);
window
[
"
asc_desktop_copypaste
"
](
this
,
"
Paste
"
);
return
true
;
}
...
...
@@ -3958,6 +3958,17 @@ background-repeat: no-repeat;\
else
{
this
.
sync_StartAction
(
c_oAscAsyncActionType
.
BlockInteraction
,
c_oAscAsyncAction
.
UploadImage
);
if
(
window
[
"
AscDesktopEditor
"
])
{
var
_url
=
window
[
"
AscDesktopEditor
"
][
"
LocalFileGetImageUrl
"
](
sImageUrl
);
_url
=
g_oDocumentUrls
.
getImageUrl
(
_url
);
ImagePr
.
ImageUrl
=
_url
;
fApplyCallback
();
this
.
sync_EndAction
(
c_oAscAsyncActionType
.
BlockInteraction
,
c_oAscAsyncAction
.
UploadImage
);
return
;
}
this
.
fCurCallback
=
function
(
input
)
{
if
(
null
!=
input
&&
"
imgurl
"
==
input
[
"
type
"
])
...
...
word/api.js
View file @
df6949da
...
...
@@ -1853,7 +1853,7 @@ background-repeat: no-repeat;\
{
if
(
window
[
"
AscDesktopEditor
"
])
{
window
[
"
AscDesktopEditor
"
][
"
Copy
"
](
);
window
[
"
asc_desktop_copypaste
"
](
this
,
"
Copy
"
);
return
true
;
}
return
AscCommon
.
g_clipboardBase
.
Button_Copy
();
...
...
@@ -1866,7 +1866,7 @@ background-repeat: no-repeat;\
{
if
(
window
[
"
AscDesktopEditor
"
])
{
window
[
"
AscDesktopEditor
"
][
"
Cut
"
](
);
window
[
"
asc_desktop_copypaste
"
](
this
,
"
Cut
"
);
return
true
;
}
return
AscCommon
.
g_clipboardBase
.
Button_Cut
();
...
...
@@ -1875,7 +1875,7 @@ background-repeat: no-repeat;\
{
if
(
window
[
"
AscDesktopEditor
"
])
{
window
[
"
AscDesktopEditor
"
][
"
Paste
"
](
);
window
[
"
asc_desktop_copypaste
"
](
this
,
"
Paste
"
);
return
true
;
}
if
(
!
this
.
WordControl
.
m_oLogicDocument
)
...
...
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