Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
erp5
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Labels
Merge Requests
0
Merge Requests
0
Analytics
Analytics
Repository
Value Stream
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Commits
Open sidebar
Romain Courteaud
erp5
Commits
88388867
Commit
88388867
authored
Sep 30, 2019
by
Roque
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
erp5_officejs_ui_test: update only office test to migration
parent
b343b610
Changes
2
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
17 additions
and
8 deletions
+17
-8
bt5/erp5_officejs_ui_test/SkinTemplateItem/portal_skins/erp5_officejs_ui_test/gadget_officejs_create_bad_document.js.js
...fficejs_ui_test/gadget_officejs_create_bad_document.js.js
+9
-4
bt5/erp5_officejs_ui_test/SkinTemplateItem/portal_skins/erp5_officejs_ui_test/gadget_ooffice_convert_check.js.js
.../erp5_officejs_ui_test/gadget_ooffice_convert_check.js.js
+8
-4
No files found.
bt5/erp5_officejs_ui_test/SkinTemplateItem/portal_skins/erp5_officejs_ui_test/gadget_officejs_create_bad_document.js.js
View file @
88388867
...
@@ -11,12 +11,13 @@
...
@@ -11,12 +11,13 @@
}),
}),
gadget
=
this
;
gadget
=
this
;
return
storage
.
put
(
'
bad_document
'
,
{
return
storage
.
put
(
'
bad_document
'
,
{
'
filename
'
:
'
test.xlsx
'
,
'
reference
'
:
'
bad_document_ooffice_upload
'
,
'
title
'
:
'
Bad Document
'
,
'
title
'
:
'
Bad Document
'
,
'
filename
'
:
'
test.xlsx
'
,
'
portal_type
'
:
'
Spreadsheet
'
,
'
portal_type
'
:
'
Spreadsheet
'
,
'
mime_type
'
:
'
xlsx
'
,
'
parent_relative_url
'
:
"
document_module
"
,
'
modification_date
'
:
'
Fri, 17 Aug 2018 11:21:22 +0000
'
,
'
content_type
'
:
"
application/x-asc-spreadsheet
"
,
'
content_type
'
:
"
application/x-asc-spreadsheet
"
'
modification_date
'
:
'
Fri, 17 Aug 2018 11:21:22 +0000
'
})
})
.
push
(
function
(
id
)
{
.
push
(
function
(
id
)
{
return
jIO
.
util
.
ajax
({
return
jIO
.
util
.
ajax
({
...
@@ -42,6 +43,10 @@
...
@@ -42,6 +43,10 @@
var
div
=
document
.
createElement
(
'
div
'
);
var
div
=
document
.
createElement
(
'
div
'
);
div
.
textContent
=
'
Document Created
'
;
div
.
textContent
=
'
Document Created
'
;
gadget
.
element
.
appendChild
(
div
);
gadget
.
element
.
appendChild
(
div
);
},
function
(
error
)
{
var
div
=
document
.
createElement
(
'
div
'
);
div
.
textContent
=
'
Error creating document:
'
+
error
.
message
;
gadget
.
element
.
appendChild
(
div
);
});
});
});
});
}(
window
,
rJS
,
jIO
,
document
,
URL
));
}(
window
,
rJS
,
jIO
,
document
,
URL
));
bt5/erp5_officejs_ui_test/SkinTemplateItem/portal_skins/erp5_officejs_ui_test/gadget_ooffice_convert_check.js.js
View file @
88388867
...
@@ -4,10 +4,11 @@
...
@@ -4,10 +4,11 @@
"
use strict
"
;
"
use strict
"
;
function
check
(
gadget
,
storage
,
format
)
{
function
check
(
gadget
,
storage
,
format
)
{
var
output_message
=
"
output_message not set - there was an error
"
;
return
new
RSVP
.
Queue
()
return
new
RSVP
.
Queue
()
.
push
(
function
()
{
.
push
(
function
()
{
return
RSVP
.
all
([
return
RSVP
.
all
([
storage
.
getAttachment
(
'
test
'
,
format
),
storage
.
getAttachment
(
'
test
'
,
'
data
'
),
jIO
.
util
.
ajax
({
jIO
.
util
.
ajax
({
type
:
"
GET
"
,
type
:
"
GET
"
,
url
:
new
URL
(
'
./test_ooo_
'
+
gadget
.
param
.
type
+
'
.
'
+
format
,
window
.
location
.
href
),
url
:
new
URL
(
'
./test_ooo_
'
+
gadget
.
param
.
type
+
'
.
'
+
format
,
window
.
location
.
href
),
...
@@ -20,13 +21,16 @@
...
@@ -20,13 +21,16 @@
jIO
.
util
.
readBlobAsText
(
result
[
0
]),
jIO
.
util
.
readBlobAsText
(
result
[
0
]),
jIO
.
util
.
readBlobAsText
(
result
[
1
].
target
.
response
)
jIO
.
util
.
readBlobAsText
(
result
[
1
].
target
.
response
)
]);
]);
},
function
(
error
)
{
output_message
=
'
ERROR converting document:
'
+
error
.
message
;
})
})
.
push
(
function
(
result
)
{
.
push
(
function
(
result
)
{
var
div
=
window
.
document
.
createElement
(
'
div
'
);
var
div
=
window
.
document
.
createElement
(
'
div
'
);
if
(
result
[
0
].
target
.
response
==
result
[
1
].
target
.
response
)
{
if
(
result
&&
result
[
0
].
target
.
response
==
result
[
1
].
target
.
response
)
{
div
.
textContent
=
'
Converted
'
+
format
+
'
OK
'
;
output_message
=
'
Converted
'
+
format
+
'
OK
'
;
gadget
.
element
.
appendChild
(
div
);
}
}
div
.
textContent
=
output_message
;
gadget
.
element
.
appendChild
(
div
);
});
});
}
}
...
...
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