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
16df914b
Commit
16df914b
authored
Feb 02, 2017
by
GoshaZotov
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
showSpecialPasteOptions / hideSpecialPasteOptions events for show/hide special paste button
parent
ec96ed3a
Changes
2
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
21 additions
and
15 deletions
+21
-15
cell/view/WorkbookView.js
cell/view/WorkbookView.js
+6
-0
cell/view/WorksheetView.js
cell/view/WorksheetView.js
+15
-15
No files found.
cell/view/WorkbookView.js
View file @
16df914b
...
...
@@ -706,6 +706,12 @@
if
(
_canvas
)
self
.
MobileTouchManager
.
CheckSelect
(
_canvas
.
trackOverlay
,
color
);
}
},
"
showSpecialPasteOptions
"
:
function
(
val
)
{
self
.
handlers
.
trigger
(
"
asc_onShowSpecialPasteOptions
"
,
val
);
},
"
hideSpecialPasteOptions
"
:
function
()
{
self
.
handlers
.
trigger
(
"
asc_onHideSpecialPasteOptions
"
);
}
});
...
...
cell/view/WorksheetView.js
View file @
16df914b
...
...
@@ -8807,6 +8807,11 @@
var
_clipboard
=
window
[
"
Asc
"
][
"
editor
"
].
wb
.
clipboard
;
var
specialPasteProps
=
_clipboard
.
specialPasteProps
;
if
(
val
.
props
&&
val
.
props
.
onlyImages
===
true
)
{
//this.handlers.trigger("showSpecialPasteOptions", autoFilterObject);
return
;
}
var
callTrigger
=
false
;
if
(
isLargeRange
)
{
callTrigger
=
true
;
...
...
@@ -8932,6 +8937,8 @@
History
.
SetSelection
(
oSelection
);
History
.
SetSelectionRedo
(
oSelection
);
}
//this.handlers.trigger("showSpecialPasteOptions", autoFilterObject);
};
WorksheetView
.
prototype
.
_loadDataBeforePaste
=
function
(
isLargeRange
,
fromBinary
,
pasteContent
,
bIsUpdate
,
canChangeColWidth
)
{
...
...
@@ -8983,10 +8990,7 @@
}
}
if
(
pasteContent
.
props
.
onlyImages
!==
true
)
{
t
.
_pasteData
(
isLargeRange
,
fromBinary
,
pasteContent
,
bIsUpdate
,
canChangeColWidth
);
}
api
.
wb
.
clipboard
.
pasteProcessor
.
_insertImagesFromBinaryWord
(
t
,
pasteContent
,
oImageMap
);
isEndTransaction
=
true
;
}
...
...
@@ -8995,12 +8999,9 @@
if
(
window
[
"
NATIVE_EDITOR_ENJINE
"
])
{
var
oImageMap
=
{};
AscCommon
.
ResetNewUrls
(
data
,
oObjectsForDownload
.
aUrls
,
oObjectsForDownload
.
aBuilderImagesByUrl
,
oImageMap
);
if
(
pasteContent
.
props
.
onlyImages
!==
true
)
{
AscCommon
.
ResetNewUrls
(
data
,
oObjectsForDownload
.
aUrls
,
oObjectsForDownload
.
aBuilderImagesByUrl
,
oImageMap
);
t
.
_pasteData
(
isLargeRange
,
fromBinary
,
pasteContent
,
bIsUpdate
,
canChangeColWidth
);
}
api
.
wb
.
clipboard
.
pasteProcessor
.
_insertImagesFromBinaryWord
(
t
,
pasteContent
,
oImageMap
);
isEndTransaction
=
true
;
...
...
@@ -9009,12 +9010,11 @@
{
AscCommon
.
sendImgUrls
(
api
,
oObjectsForDownload
.
aUrls
,
function
(
data
)
{
var
oImageMap
=
{};
AscCommon
.
ResetNewUrls
(
data
,
oObjectsForDownload
.
aUrls
,
oObjectsForDownload
.
aBuilderImagesByUrl
,
oImageMap
);
if
(
pasteContent
.
props
.
onlyImages
!==
true
)
{
AscCommon
.
ResetNewUrls
(
data
,
oObjectsForDownload
.
aUrls
,
oObjectsForDownload
.
aBuilderImagesByUrl
,
oImageMap
);
t
.
_pasteData
(
isLargeRange
,
fromBinary
,
pasteContent
,
bIsUpdate
,
canChangeColWidth
);
}
api
.
wb
.
clipboard
.
pasteProcessor
.
_insertImagesFromBinaryWord
(
t
,
pasteContent
,
oImageMap
);
//закрываем транзакцию, поскольку в setSelectionInfo она не закроется
History
.
EndTransaction
();
},
true
);
...
...
@@ -9022,7 +9022,7 @@
}
}
else
if
(
pasteContent
.
props
.
onlyImages
!==
true
)
else
{
t
.
_pasteData
(
isLargeRange
,
fromBinary
,
pasteContent
,
bIsUpdate
,
canChangeColWidth
);
isEndTransaction
=
true
;
...
...
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