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
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Analytics
Analytics
CI / CD
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Klaus Wölfel
erp5
Commits
5be69ea3
Commit
5be69ea3
authored
Jan 16, 2018
by
Boris Kocherov
Committed by
Vincent Bechu
Jan 18, 2018
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
[erp5_only_office][erp5_officejs_ui_test] prevent creating empty zip archive during save
parent
7ba249f0
Changes
5
Show whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
38 additions
and
71 deletions
+38
-71
bt5/erp5_officejs_ui_test/PathTemplateItem/portal_tests/officejs_ui_ooo_presentation_zuite/testOnlyfficePresentation.zpt
...s_ui_ooo_presentation_zuite/testOnlyfficePresentation.zpt
+4
-26
bt5/erp5_officejs_ui_test/PathTemplateItem/portal_tests/officejs_ui_ooo_spreadsheet_zuite/testOnlyfficeSpreadsheet.zpt
...ejs_ui_ooo_spreadsheet_zuite/testOnlyfficeSpreadsheet.zpt
+4
-26
bt5/erp5_officejs_ui_test/PathTemplateItem/portal_tests/officejs_ui_ooo_text_zuite/testOnlyfficeText.zpt
...al_tests/officejs_ui_ooo_text_zuite/testOnlyfficeText.zpt
+3
-11
bt5/erp5_officejs_ui_test/SkinTemplateItem/portal_skins/erp5_officejs_ui_test/Zuite_CommonTemplateForOnlyOffice.zpt
...p5_officejs_ui_test/Zuite_CommonTemplateForOnlyOffice.zpt
+10
-4
bt5/erp5_only_office/SkinTemplateItem/portal_skins/erp5_only_office/onlyoffice.gadget.js.js
...tem/portal_skins/erp5_only_office/onlyoffice.gadget.js.js
+17
-4
No files found.
bt5/erp5_officejs_ui_test/PathTemplateItem/portal_tests/officejs_ui_ooo_presentation_zuite/testOnlyfficePresentation.zpt
View file @
5be69ea3
...
...
@@ -127,7 +127,7 @@
</tr>
<tr>
<td>
store
</td>
<td
tal:content=
"python: '
Test Titre %s' % DateTime(
)"
>
Titre
</td>
<td
tal:content=
"python: '
test_presentation_%s' % DateTime().strftime('%Y%m%d%H%M%S'
)"
>
Titre
</td>
<td>
title
</td>
</tr>
<tr>
...
...
@@ -181,36 +181,14 @@
<td>
${description}
</td>
</tr>
<tal:block
metal:use-macro=
"here/Zuite_CommonTemplateForOnlyOffice/macros/wait_for_load_presentation"
/>
<tr>
<td>
click
</td>
<td>
//button[@data-i18n='Save']
</td>
<td></td>
</tr>
<tr>
<td>
waitForElementPresent
</td>
<td>
//div[@data-gadget-scope="notification"]//button[text()='Data Updated']
</td>
<td></td>
</tr>
<tal:block
metal:use-macro=
"here/Zuite_CommonTemplateForOnlyOffice/macros/save"
/>
<tr>
<td>
click
</td>
<td>
//a[@data-i18n='Document']
</td>
<td></td>
</tr>
<tr>
<td>
waitForElementPresent
</td>
<td>
link=Add
</td>
<td></td>
</tr>
<tr>
<td>
waitForElementPresent
</td>
<td>
link=${title}
</td>
<td></td>
</tr>
<tr>
<td>
click
</td>
<td>
link=${title}
</td>
<td></td>
</tr>
<tal:block
metal:use-macro=
"here/Zuite_CommonTemplateForOnlyOffice/macros/open_document_with_title"
/>
<tal:block
metal:use-macro=
"here/Zuite_CommonTemplateForOnlyOffice/macros/wait_for_load_presentation"
/>
<tr>
<td>
waitForElementPresent
</td>
<td>
//textarea[@title='Description']
</td>
...
...
bt5/erp5_officejs_ui_test/PathTemplateItem/portal_tests/officejs_ui_ooo_spreadsheet_zuite/testOnlyfficeSpreadsheet.zpt
View file @
5be69ea3
...
...
@@ -127,7 +127,7 @@
</tr>
<tr>
<td>
store
</td>
<td
tal:content=
"python: '
Test Titre %s' % DateTime(
)"
>
Titre
</td>
<td
tal:content=
"python: '
test_spreadsheet_%s' % DateTime().strftime('%Y%m%d%H%M%S'
)"
>
Titre
</td>
<td>
title
</td>
</tr>
<tr>
...
...
@@ -181,36 +181,14 @@
<td>
${description}
</td>
</tr>
<tal:block
metal:use-macro=
"here/Zuite_CommonTemplateForOnlyOffice/macros/wait_for_load_spreadsheet"
/>
<tr>
<td>
click
</td>
<td>
//button[@data-i18n='Save']
</td>
<td></td>
</tr>
<tr>
<td>
waitForElementPresent
</td>
<td>
//div[@data-gadget-scope="notification"]//button[text()='Data Updated']
</td>
<td></td>
</tr>
<tal:block
metal:use-macro=
"here/Zuite_CommonTemplateForOnlyOffice/macros/save"
/>
<tr>
<td>
click
</td>
<td>
//a[@data-i18n='Document']
</td>
<td></td>
</tr>
<tr>
<td>
waitForElementPresent
</td>
<td>
link=Add
</td>
<td></td>
</tr>
<tr>
<td>
waitForElementPresent
</td>
<td>
link=${title}
</td>
<td></td>
</tr>
<tr>
<td>
click
</td>
<td>
link=${title}
</td>
<td></td>
</tr>
<tal:block
metal:use-macro=
"here/Zuite_CommonTemplateForOnlyOffice/macros/open_document_with_title"
/>
<tal:block
metal:use-macro=
"here/Zuite_CommonTemplateForOnlyOffice/macros/wait_for_load_spreadsheet"
/>
<tr>
<td>
waitForElementPresent
</td>
<td>
//textarea[@title='Description']
</td>
...
...
bt5/erp5_officejs_ui_test/PathTemplateItem/portal_tests/officejs_ui_ooo_text_zuite/testOnlyfficeText.zpt
View file @
5be69ea3
...
...
@@ -127,7 +127,7 @@
</tr>
<tr>
<td>
store
</td>
<td>
Titre
</td>
<td
tal:content=
"python: 'test_text_%s' % DateTime().strftime('%Y%m%d%H%M%S')"
>
Titre
</td>
<td>
title
</td>
</tr>
<tr>
...
...
@@ -181,22 +181,14 @@
<td>
${description}
</td>
</tr>
<tal:block
metal:use-macro=
"here/Zuite_CommonTemplateForOnlyOffice/macros/wait_for_load"
/>
<tr>
<td>
click
</td>
<td>
//button[@data-i18n='Save']
</td>
<td></td>
</tr>
<tr>
<td>
waitForElementPresent
</td>
<td>
//div[@data-gadget-scope="notification"]//button[text()='Data Updated']
</td>
<td></td>
</tr>
<tal:block
metal:use-macro=
"here/Zuite_CommonTemplateForOnlyOffice/macros/save"
/>
<tr>
<td>
click
</td>
<td>
//a[@data-i18n='Document']
</td>
<td></td>
</tr>
<tal:block
metal:use-macro=
"here/Zuite_CommonTemplateForOnlyOffice/macros/open_document_with_title"
/>
<tal:block
metal:use-macro=
"here/Zuite_CommonTemplateForOnlyOffice/macros/wait_for_load"
/>
<tr>
<td>
waitForElementPresent
</td>
<td>
//textarea[@title='Description']
</td>
...
...
bt5/erp5_officejs_ui_test/SkinTemplateItem/portal_skins/erp5_officejs_ui_test/Zuite_CommonTemplateForOnlyOffice.zpt
View file @
5be69ea3
<tal:block xmlns:tal="http://xml.zope.org/namespaces/tal"
xmlns:metal="http://xml.zope.org/namespaces/metal">
<tal:block metal:define-macro="wait_for_load_spreadsheet">
<!-- Wait for OnlyOffice run -->
<tr>
<td colspan="3"><b>Wait for load OnlyOffice</b></td>
</tr>
<tr>
<td>waitForElementPresent</td>
<td>//div[@class='asc-loadmask-title']</td>
...
...
@@ -19,7 +21,9 @@
</tr>
</tal:block>
<tal:block metal:define-macro="wait_for_load">
<!-- Wait for OnlyOffice run -->
<tr>
<td colspan="3"><b>Wait for load OnlyOffice</b></td>
</tr>
<tr>
<td>waitForElementPresent</td>
<td>//div[@class='asc-loadmask-title']</td>
...
...
@@ -37,7 +41,9 @@
</tr>
</tal:block>
<tal:block metal:define-macro="wait_for_load_presentation">
<!-- Wait for OnlyOffice run -->
<tr>
<td colspan="3"><b>Wait for load OnlyOffice</b></td>
</tr>
<tr>
<td>waitForElementPresent</td>
<td>//div[@class='asc-loadmask-title']</td>
...
...
bt5/erp5_only_office/SkinTemplateItem/portal_skins/erp5_only_office/onlyoffice.gadget.js.js
View file @
5be69ea3
/*global window, rJS, RSVP, DocsAPI, console, document,
Common, require, jIO, URL, FileReader, atob, ArrayBuffer,
Uint8Array, XMLHttpRequest, Blob, Rusha*/
Uint8Array, XMLHttpRequest, Blob, Rusha
, define
*/
/*jslint nomen: true, maxlen:80, indent:2*/
"
use strict
"
;
if
(
Common
===
undefined
)
{
...
...
@@ -277,7 +277,7 @@ DocsAPI.DocEditor.version = function () {
return
g
.
props
.
value_zip_storage
.
getAttachment
(
'
/
'
,
'
body.txt
'
)
.
push
(
undefined
,
function
(
error
)
{
if
(
error
.
status_code
===
404
)
{
throw
'
not supported format of document: "
'
+
throw
'
not supported format of document:
body.txt absent
"
'
+
value
.
slice
(
0
,
100
)
+
'
"
'
;
}
throw
error
;
...
...
@@ -395,7 +395,7 @@ DocsAPI.DocEditor.version = function () {
require
.
onError
=
function
(
error
)
{
console
.
error
(
error
);
};
require
.
config
({
catchError
:
true
});
require
.
config
({
catchError
:
true
});
if
(
g
.
props
.
binary_loader
)
{
g
.
props
.
base_url
=
"
onlyoffice-bin/
"
;
...
...
@@ -441,7 +441,20 @@ DocsAPI.DocEditor.version = function () {
}
})
.
push
(
function
()
{
return
zip
.
getAttachment
(
'
/
'
,
'
body.txt
'
)
.
push
(
undefined
,
function
(
error
)
{
if
(
error
.
status_code
===
404
)
{
return
""
;
}
throw
error
;
});
})
.
push
(
function
(
Editor_bin
)
{
if
(
Editor_bin
)
{
return
zip
.
getAttachment
(
'
/
'
,
'
/
'
);
}
else
{
return
new
Blob
();
}
})
.
push
(
function
(
zip_blob
)
{
return
jIO
.
util
.
readBlobAsDataURL
(
zip_blob
);
...
...
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