Skip to content
GitLab
Menu
Projects
Groups
Snippets
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
dariah
search-commons-webresources
Commits
1e554908
Commit
1e554908
authored
Sep 16, 2019
by
Gradl, Tobias
Browse files
1315: Download button for MWW instance (iframe based)
Task-Url:
https://pm.winseda.de/issues/1315
parent
abdd9aa9
Changes
1
Show whitespace changes
Inline
Side-by-side
js/item/item.js
View file @
1e554908
...
@@ -130,7 +130,10 @@ ResultItem.prototype.downloadData = function(format, model) {
...
@@ -130,7 +130,10 @@ ResultItem.prototype.downloadData = function(format, model) {
ResultItem
.
prototype
.
handleDownloadedData
=
function
(
data
)
{
ResultItem
.
prototype
.
handleDownloadedData
=
function
(
data
)
{
if
(
window
.
location
!==
window
.
parent
.
location
)
{
if
(
window
.
location
!==
window
.
parent
.
location
)
{
window
.
parent
.
postMessage
(
window
.
btoa
(
data
.
pojo
),
'
*
'
);
var
base64
=
btoa
(
data
.
pojo
.
replace
(
/
[\u
00A0-
\u
2666
]
/g
,
function
(
c
)
{
return
'
&#
'
+
c
.
charCodeAt
(
0
)
+
'
;
'
;
}));
window
.
parent
.
postMessage
(
base64
,
'
*
'
);
}
else
{
}
else
{
// For now only hardcoded xml
// For now only hardcoded xml
var
blob
=
new
Blob
([
data
.
pojo
],
{
type
:
"
application/xml
"
});
var
blob
=
new
Blob
([
data
.
pojo
],
{
type
:
"
application/xml
"
});
...
...
Write
Preview
Supports
Markdown
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