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
146
Merge Requests
146
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
Jobs
Commits
Open sidebar
nexedi
erp5
Commits
2fdb9f31
Commit
2fdb9f31
authored
Sep 25, 2019
by
Klaus Wölfel
Committed by
Klaus Wölfel
Sep 26, 2019
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
[erp5_officejs] port notebook to gadget_jsmd_eval and add pdf conversion
parent
e559ecd5
Changes
26
Expand all
Hide whitespace changes
Inline
Side-by-side
Showing
26 changed files
with
2182 additions
and
64 deletions
+2182
-64
bt5/erp5_officejs/PathTemplateItem/web_page_module/gadget_officejs_jio_notebook_execute_html.html
...age_module/gadget_officejs_jio_notebook_execute_html.html
+28
-0
bt5/erp5_officejs/PathTemplateItem/web_page_module/gadget_officejs_jio_notebook_execute_html.xml
...page_module/gadget_officejs_jio_notebook_execute_html.xml
+338
-0
bt5/erp5_officejs/PathTemplateItem/web_page_module/gadget_officejs_jio_notebook_execute_js.js
...eb_page_module/gadget_officejs_jio_notebook_execute_js.js
+213
-0
bt5/erp5_officejs/PathTemplateItem/web_page_module/gadget_officejs_jio_notebook_execute_js.xml
...b_page_module/gadget_officejs_jio_notebook_execute_js.xml
+334
-0
bt5/erp5_officejs/PathTemplateItem/web_page_module/gadget_officejs_jio_notebook_view_html.html
...b_page_module/gadget_officejs_jio_notebook_view_html.html
+5
-2
bt5/erp5_officejs/PathTemplateItem/web_page_module/gadget_officejs_jio_notebook_view_html.xml
...eb_page_module/gadget_officejs_jio_notebook_view_html.xml
+3
-3
bt5/erp5_officejs/PathTemplateItem/web_page_module/gadget_officejs_jio_notebook_view_js.js
...m/web_page_module/gadget_officejs_jio_notebook_view_js.js
+87
-10
bt5/erp5_officejs/PathTemplateItem/web_page_module/gadget_officejs_jio_notebook_view_js.xml
.../web_page_module/gadget_officejs_jio_notebook_view_js.xml
+3
-3
bt5/erp5_officejs/PathTemplateItem/web_page_module/gadget_officejs_notebook.appcache.xml
...tem/web_page_module/gadget_officejs_notebook.appcache.xml
+11
-18
bt5/erp5_officejs/PathTemplateItem/web_page_module/gadget_officejs_notebook_router.html.html
...web_page_module/gadget_officejs_notebook_router.html.html
+4
-1
bt5/erp5_officejs/PathTemplateItem/web_page_module/gadget_officejs_notebook_router.html.xml
.../web_page_module/gadget_officejs_notebook_router.html.xml
+2
-2
bt5/erp5_officejs/PathTemplateItem/web_page_module/ojs_gadget_cloudooo_js.js
...athTemplateItem/web_page_module/ojs_gadget_cloudooo_js.js
+1
-1
bt5/erp5_officejs/PathTemplateItem/web_page_module/ojs_gadget_cloudooo_js.xml
...thTemplateItem/web_page_module/ojs_gadget_cloudooo_js.xml
+2
-2
bt5/erp5_officejs/PathTemplateItem/web_page_module/ojs_gadget_erp5_page_ojs_download_html.html
...b_page_module/ojs_gadget_erp5_page_ojs_download_html.html
+21
-1
bt5/erp5_officejs/PathTemplateItem/web_page_module/ojs_gadget_erp5_page_ojs_download_html.xml
...eb_page_module/ojs_gadget_erp5_page_ojs_download_html.xml
+2
-2
bt5/erp5_officejs/PathTemplateItem/web_page_module/ojs_gadget_erp5_page_ojs_download_js.js
...m/web_page_module/ojs_gadget_erp5_page_ojs_download_js.js
+196
-15
bt5/erp5_officejs/PathTemplateItem/web_page_module/ojs_gadget_erp5_page_ojs_download_js.xml
.../web_page_module/ojs_gadget_erp5_page_ojs_download_js.xml
+2
-2
bt5/erp5_officejs/PathTemplateItem/web_page_module/ojs_gadget_ojs_cloudooo_js.js
...emplateItem/web_page_module/ojs_gadget_ojs_cloudooo_js.js
+1
-0
bt5/erp5_officejs/PathTemplateItem/web_page_module/ojs_gadget_ojs_cloudooo_js.xml
...mplateItem/web_page_module/ojs_gadget_ojs_cloudooo_js.xml
+2
-2
bt5/erp5_officejs/bt/dependency_list
bt5/erp5_officejs/bt/dependency_list
+1
-0
bt5/erp5_officejs_ui_test/PathTemplateItem/portal_tests/officejs_ui_notebook_zuite/%20testOfficejsNotebookErp5Synchronization.xml
...book_zuite/%20testOfficejsNotebookErp5Synchronization.xml
+58
-0
bt5/erp5_officejs_ui_test/PathTemplateItem/portal_tests/officejs_ui_notebook_zuite/%20testOfficejsNotebookErp5Synchronization.zpt
...book_zuite/%20testOfficejsNotebookErp5Synchronization.zpt
+203
-0
bt5/erp5_officejs_ui_test/PathTemplateItem/portal_tests/officejs_ui_notebook_zuite/testOfficejsNotebookExport.xml
...officejs_ui_notebook_zuite/testOfficejsNotebookExport.xml
+58
-0
bt5/erp5_officejs_ui_test/PathTemplateItem/portal_tests/officejs_ui_notebook_zuite/testOfficejsNotebookExport.zpt
...officejs_ui_notebook_zuite/testOfficejsNotebookExport.zpt
+242
-0
bt5/erp5_officejs_ui_test/PathTemplateItem/portal_tests/officejs_ui_notebook_zuite/testOfficsjsNotebook.xml
...tests/officejs_ui_notebook_zuite/testOfficsjsNotebook.xml
+58
-0
bt5/erp5_officejs_ui_test/PathTemplateItem/portal_tests/officejs_ui_notebook_zuite/testOfficsjsNotebook.zpt
...tests/officejs_ui_notebook_zuite/testOfficsjsNotebook.zpt
+307
-0
No files found.
bt5/erp5_officejs/PathTemplateItem/web_page_module/gadget_officejs_jio_notebook_execute_html.html
0 → 100644
View file @
2fdb9f31
<!doctype html>
<html>
<head>
<meta
charset=
"utf-8"
>
<meta
name=
"viewport"
content=
"width=device-width, initial-scale=1"
>
<title>
OfficeJS Jio Notebook View
</title>
<script
src=
"rsvp.js"
></script>
<script
src=
"renderjs.js"
></script>
<script
src=
"gadget_erp5_page_execute_notebook.js"
></script>
</head>
<body>
<form
class=
"save_form ui-body-c"
novalidate
>
<div
data-gadget-url=
"gadget_erp5_form.html"
data-gadget-scope=
"form_view"
data-gadget-sandbox=
"public"
>
</div>
<div
data-gadget-url=
"gadget_ojs_cloudooo.html"
data-gadget-scope=
"ojs_cloudooo"
data-gadget-sandbox=
"public"
>
</div>
</form>
</body>
</html>
bt5/erp5_officejs/PathTemplateItem/web_page_module/gadget_officejs_jio_notebook_execute_html.xml
0 → 100644
View file @
2fdb9f31
This diff is collapsed.
Click to expand it.
bt5/erp5_officejs/PathTemplateItem/web_page_module/gadget_officejs_jio_notebook_execute_js.js
0 → 100644
View file @
2fdb9f31
/*global window, rJS, RSVP */
/*jslint nomen: true, indent: 2, maxerr: 3 */
(
function
(
window
,
document
,
rJS
,
RSVP
,
promiseEventListener
,
Blob
,
DOMParser
)
{
"
use strict
"
;
var
ATT_NAME
=
"
data
"
;
function
ExportContent
(
gadget
)
{
var
html
=
(
new
DOMParser
()).
parseFromString
(
'
<html><head><head><body><p></p></body></html>
'
,
'
text/html
'
).
documentElement
;
html
.
querySelector
(
'
p
'
).
innerHTML
=
gadget
.
state
.
doc
.
text_content
;
if
(
!
gadget
.
state
.
editable
)
{
html
=
document
.
querySelector
(
'
[data-gadget-scope="editor"]
'
).
firstChild
.
contentDocument
.
body
.
firstChild
.
contentDocument
.
firstChild
;
}
html
.
firstChild
.
innerHTML
=
""
;
return
new
RSVP
.
Queue
()
.
push
(
function
()
{
return
gadget
.
jio_putAttachment
(
gadget
.
state
.
jio_key
,
"
data
"
,
new
Blob
([
html
.
outerHTML
],
{
type
:
'
text/html
'
})
)
.
push
(
function
()
{
return
gadget
.
jio_putAttachment
(
gadget
.
state
.
jio_key
,
"
options
"
,
JSON
.
stringify
({
encoding
:
[
"
utf8
"
,
"
string
"
],
page_size
:
[
"
A4
"
,
"
string
"
],
zoom
:
[
1
,
"
double
"
],
dpi
:
[
"
300
"
,
"
string
"
],
header_center
:
[
"
document Title
"
,
"
string
"
]
})
);
});
})
.
push
(
function
()
{
return
gadget
.
getDeclaredGadget
(
"
ojs_cloudooo
"
);
})
.
push
(
function
(
cloudooo
)
{
return
gadget
.
jio_getAttachment
(
gadget
.
state
.
jio_key
,
"
options
"
,
{
"
format
"
:
"
json
"
})
.
push
(
function
(
options
)
{
return
cloudooo
.
putAllCloudoooConvertionOperation
({
format
:
"
html
"
,
jio_key
:
gadget
.
state
.
jio_key
,
conversion_kw
:
options
});
});
});
}
rJS
(
window
)
.
allowPublicAcquisition
(
'
triggerEditable
'
,
function
(
options
)
{
var
gadget
=
this
;
return
new
RSVP
.
Queue
()
.
push
(
function
()
{
return
gadget
.
getDeclaredGadget
(
'
form_view
'
);
})
.
push
(
function
(
form_gadget
)
{
return
form_gadget
.
getContent
();
})
.
push
(
function
(
content
)
{
for
(
var
key
in
gadget
.
state
.
doc
)
{
if
(
!
(
key
in
content
))
{
content
[
key
]
=
gadget
.
state
.
doc
[
key
];
}
}
return
gadget
.
changeState
({
//doc: content,
editable
:
options
[
0
].
editable
});
});
})
/////////////////////////////////////////////////////////////////
// Acquired methods
/////////////////////////////////////////////////////////////////
.
declareAcquiredMethod
(
"
updateHeader
"
,
"
updateHeader
"
)
.
declareAcquiredMethod
(
"
jio_get
"
,
"
jio_get
"
)
.
declareAcquiredMethod
(
"
jio_putAttachment
"
,
"
jio_putAttachment
"
)
.
declareAcquiredMethod
(
"
jio_getAttachment
"
,
"
jio_getAttachment
"
)
.
declareAcquiredMethod
(
"
getUrlParameter
"
,
"
getUrlParameter
"
)
.
declareAcquiredMethod
(
"
getUrlFor
"
,
"
getUrlFor
"
)
.
declareAcquiredMethod
(
"
updateDocument
"
,
"
updateDocument
"
)
.
declareAcquiredMethod
(
"
notifySubmitting
"
,
"
notifySubmitting
"
)
.
declareAcquiredMethod
(
"
notifySubmitted
"
,
'
notifySubmitted
'
)
/////////////////////////////////////////////////////////////////
// declared methods
/////////////////////////////////////////////////////////////////
.
declareService
(
function
()
{
var
gadget
=
this
,
props
=
gadget
.
__sub_gadget_dict
.
form_view
,
div
=
props
.
element
.
querySelector
(
"
div
"
);
return
new
RSVP
.
Queue
()
.
push
(
function
()
{
return
promiseEventListener
(
div
,
"
load
"
,
true
);
})
.
push
(
function
(
my_event
)
{
document
.
querySelector
(
'
[data-i18n="Export"]
'
).
addEventListener
(
"
click
"
,
function
()
{
ExportContent
(
gadget
);
},
false
);
});
})
.
declareMethod
(
"
render
"
,
function
(
options
)
{
var
gadget
=
this
;
return
gadget
.
jio_get
(
options
.
jio_key
)
.
push
(
function
(
result
)
{
return
gadget
.
changeState
({
jio_key
:
options
.
jio_key
,
doc
:
result
,
editable
:
options
.
editable
});
});
})
.
onEvent
(
'
submit
'
,
function
()
{
var
gadget
=
this
;
return
gadget
.
notifySubmitting
()
.
push
(
function
()
{
return
gadget
.
getDeclaredGadget
(
'
form_view
'
);
})
.
push
(
function
(
form_gadget
)
{
return
form_gadget
.
getContent
();
})
.
push
(
function
(
content
)
{
return
gadget
.
updateDocument
(
content
);
})
.
push
(
function
()
{
return
gadget
.
notifySubmitted
({
message
:
'
Data Updated
'
,
status
:
'
success
'
});
});
})
.
declareMethod
(
"
triggerSubmit
"
,
function
()
{
return
this
.
element
.
querySelector
(
'
button[type="submit"]
'
).
click
();
})
.
onStateChange
(
function
()
{
var
gadget
=
this
;
return
gadget
.
getDeclaredGadget
(
'
form_view
'
)
.
push
(
function
(
form_gadget
)
{
return
form_gadget
.
render
({
erp5_document
:
{
"
_embedded
"
:
{
"
_view
"
:
{
"
my_content
"
:
{
"
default
"
:
gadget
.
state
.
doc
.
text_content
,
"
css_class
"
:
""
,
"
required
"
:
0
,
"
editable
"
:
0
,
"
key
"
:
"
text_content
"
,
"
hidden
"
:
0
,
"
type
"
:
"
GadgetField
"
,
"
url
"
:
"
gadget_editor.html
"
,
"
sandbox
"
:
"
public
"
,
"
renderjs_extra
"
:
'
{"editor": "jsmd_editor", "maximize": true}
'
}
}},
"
_links
"
:
{
"
type
"
:
{
// form_list display portal_type in header
name
:
""
}
}
},
form_definition
:
{
group_list
:
[[
"
left
"
,
[[
"
my_title
"
],
[
"
my_reference
"
]]
],
[
"
right
"
,
[[
"
my_version
"
],
[
"
my_language
"
]]
],
[
"
center
"
,
[[
"
my_description
"
]]
],
[
"
bottom
"
,
[[
"
my_content
"
]]
]]
}
});
})
.
push
(
function
()
{
return
RSVP
.
all
([
gadget
.
getUrlFor
({
command
:
'
history_previous
'
}),
gadget
.
getUrlFor
({
command
:
'
selection_previous
'
}),
gadget
.
getUrlFor
({
command
:
'
selection_next
'
}),
gadget
.
getUrlFor
({
command
:
'
change
'
,
options
:
{
'
page
'
:
"
ojs_download
"
}
}),
gadget
.
getUrlFor
({
command
:
'
change
'
,
options
:
{
'
page
'
:
"
ojs_controller
"
}
})
]);
})
.
push
(
function
(
url_list
)
{
return
gadget
.
updateHeader
({
page_title
:
gadget
.
state
.
doc
.
title
,
//save_action: true,
//selection_url: url_list[0],
//previous_url: url_list[1],
//next_url: url_list[2],
edit_url
:
url_list
[
4
],
//view_url: url_list[3]
export_url
:
url_list
[
3
]
//actions_url: url_list[4]
//fast_input_url: url_list[3]
});
});
});
}(
window
,
document
,
rJS
,
RSVP
,
promiseEventListener
,
Blob
,
DOMParser
));
bt5/erp5_officejs/PathTemplateItem/web_page_module/gadget_officejs_jio_notebook_execute_js.xml
0 → 100644
View file @
2fdb9f31
This diff is collapsed.
Click to expand it.
bt5/erp5_officejs/PathTemplateItem/web_page_module/gadget_officejs_jio_notebook_view
.
html.html
→
bt5/erp5_officejs/PathTemplateItem/web_page_module/gadget_officejs_jio_notebook_view
_
html.html
View file @
2fdb9f31
...
...
@@ -14,12 +14,15 @@
<body>
<form
class=
"save_form ui-body-c"
novalidate
>
<button
type=
"submit"
class=
"ui-btn ui-btn-b ui-btn-inline
ui-icon-edit ui-btn-icon-right ui-screen-hidden"
></button>
<div
data-gadget-url=
"gadget_erp5_form.html"
data-gadget-scope=
"form_view"
data-gadget-sandbox=
"public"
>
</div>
<div
data-gadget-url=
"gadget_ojs_cloudooo.html"
data-gadget-scope=
"ojs_cloudooo"
data-gadget-sandbox=
"public"
>
</div>
</form>
</body>
</html>
bt5/erp5_officejs/PathTemplateItem/web_page_module/gadget_officejs_jio_notebook_view
.
html.xml
→
bt5/erp5_officejs/PathTemplateItem/web_page_module/gadget_officejs_jio_notebook_view
_
html.xml
View file @
2fdb9f31
...
...
@@ -91,7 +91,7 @@
</item>
<item>
<key>
<string>
id
</string>
</key>
<value>
<string>
gadget_officejs_jio_notebook_view
.
html
</string>
</value>
<value>
<string>
gadget_officejs_jio_notebook_view
_
html
</string>
</value>
</item>
<item>
<key>
<string>
language
</string>
</key>
...
...
@@ -248,7 +248,7 @@
</item>
<item>
<key>
<string>
serial
</string>
</key>
<value>
<string>
9
69.37889.56311.2575
3
</string>
</value>
<value>
<string>
9
78.45670.46677.3058
3
</string>
</value>
</item>
<item>
<key>
<string>
state
</string>
</key>
...
...
@@ -266,7 +266,7 @@
</tuple>
<state>
<tuple>
<float>
15
34254952.0
</float>
<float>
15
69509987.24
</float>
<string>
UTC
</string>
</tuple>
</state>
...
...
bt5/erp5_officejs/PathTemplateItem/web_page_module/gadget_officejs_jio_notebook_view
.
js.js
→
bt5/erp5_officejs/PathTemplateItem/web_page_module/gadget_officejs_jio_notebook_view
_
js.js
View file @
2fdb9f31
/*global window, rJS, RSVP */
/*jslint nomen: true, indent: 2, maxerr: 3 */
(
function
(
window
,
rJS
,
RSVP
)
{
(
function
(
window
,
document
,
rJS
,
RSVP
,
promiseEventListener
,
Blob
,
DOMParser
)
{
"
use strict
"
;
var
ATT_NAME
=
"
data
"
;
function
ExportContent
(
gadget
)
{
var
html
=
(
new
DOMParser
()).
parseFromString
(
'
<html><head><head><body><p></p></body></html>
'
,
'
text/html
'
).
documentElement
;
html
.
querySelector
(
'
p
'
).
innerHTML
=
gadget
.
state
.
doc
.
text_content
;
if
(
!
gadget
.
state
.
editable
)
{
html
=
document
.
querySelector
(
'
[data-gadget-scope="editor"]
'
).
firstChild
.
contentDocument
.
body
.
firstChild
.
contentDocument
.
firstChild
;
}
html
.
firstChild
.
innerHTML
=
""
;
return
new
RSVP
.
Queue
()
.
push
(
function
()
{
return
gadget
.
jio_putAttachment
(
gadget
.
state
.
jio_key
,
"
data
"
,
new
Blob
([
html
.
outerHTML
],
{
type
:
'
text/html
'
})
)
.
push
(
function
()
{
return
gadget
.
jio_putAttachment
(
gadget
.
state
.
jio_key
,
"
options
"
,
JSON
.
stringify
({
encoding
:
[
"
utf8
"
,
"
string
"
],
page_size
:
[
"
A4
"
,
"
string
"
],
zoom
:
[
1
,
"
double
"
],
dpi
:
[
"
300
"
,
"
string
"
],
header_center
:
[
"
document Title
"
,
"
string
"
]
})
);
});
})
.
push
(
function
()
{
return
gadget
.
getDeclaredGadget
(
"
ojs_cloudooo
"
);
})
.
push
(
function
(
cloudooo
)
{
return
gadget
.
jio_getAttachment
(
gadget
.
state
.
jio_key
,
"
options
"
,
{
"
format
"
:
"
json
"
})
.
push
(
function
(
options
)
{
return
cloudooo
.
putAllCloudoooConvertionOperation
({
format
:
"
html
"
,
jio_key
:
gadget
.
state
.
jio_key
,
conversion_kw
:
options
});
});
});
}
rJS
(
window
)
/////////////////////////////////////////////////////////////////
// Acquired methods
/////////////////////////////////////////////////////////////////
.
declareAcquiredMethod
(
"
updateHeader
"
,
"
updateHeader
"
)
.
declareAcquiredMethod
(
"
jio_putAttachment
"
,
"
jio_putAttachment
"
)
.
declareAcquiredMethod
(
"
jio_getAttachment
"
,
"
jio_getAttachment
"
)
.
declareAcquiredMethod
(
"
getUrlParameter
"
,
"
getUrlParameter
"
)
.
declareAcquiredMethod
(
"
getUrlFor
"
,
"
getUrlFor
"
)
.
declareAcquiredMethod
(
"
updateDocument
"
,
"
updateDocument
"
)
...
...
@@ -18,10 +68,29 @@
// declared methods
/////////////////////////////////////////////////////////////////
.
declareService
(
function
()
{
var
gadget
=
this
,
props
=
gadget
.
__sub_gadget_dict
.
form_view
,
div
=
props
.
element
.
querySelector
(
"
div
"
);
return
new
RSVP
.
Queue
()
.
push
(
function
()
{
return
promiseEventListener
(
div
,
"
load
"
,
true
);
})
.
push
(
function
(
my_event
)
{
document
.
querySelector
(
'
[data-i18n="Export"]
'
).
addEventListener
(
"
click
"
,
function
()
{
ExportContent
(
gadget
);
},
false
);
});
})
.
declareMethod
(
"
render
"
,
function
(
options
)
{
return
this
.
changeState
({
jio_key
:
options
.
jio_key
,
doc
:
options
.
doc
var
gadget
=
this
;
return
new
RSVP
.
Queue
()
.
push
(
function
()
{
return
gadget
.
changeState
({
jio_key
:
options
.
jio_key
,
doc
:
options
.
doc
,
editable
:
options
.
editable
});
});
})
...
...
@@ -118,7 +187,7 @@
"
type
"
:
"
GadgetField
"
,
"
url
"
:
"
gadget_editor.html
"
,
"
sandbox
"
:
"
public
"
,
"
renderjs_extra
"
:
'
{"editor": "
notebook
_editor", "maximize": true}
'
"
renderjs_extra
"
:
'
{"editor": "
jsmd
_editor", "maximize": true}
'
}
}},
"
_links
"
:
{
...
...
@@ -153,6 +222,10 @@
gadget
.
getUrlFor
({
command
:
'
change
'
,
options
:
{
'
page
'
:
"
ojs_download
"
}
}),
gadget
.
getUrlFor
({
command
:
'
change
'
,
options
:
{
'
page
'
:
'
execute_notebook
'
}
})
]);
})
...
...
@@ -160,11 +233,15 @@
return
gadget
.
updateHeader
({
page_title
:
gadget
.
state
.
doc
.
title
,
save_action
:
true
,
selection_url
:
url_list
[
0
],
previous_url
:
url_list
[
1
],
next_url
:
url_list
[
2
],
download_url
:
url_list
[
3
]
//selection_url: url_list[0],
//previous_url: url_list[1],
//next_url: url_list[2],
//edit_url: url_list[4],
//view_url: url_list[4],
export_url
:
url_list
[
3
],
actions_url
:
url_list
[
4
]
//fast_input_url: url_list[3]
});
});
});
}(
window
,
rJS
,
RSVP
));
}(
window
,
document
,
rJS
,
RSVP
,
promiseEventListener
,
Blob
,
DOMParser
));
bt5/erp5_officejs/PathTemplateItem/web_page_module/gadget_officejs_jio_notebook_view
.
js.xml
→
bt5/erp5_officejs/PathTemplateItem/web_page_module/gadget_officejs_jio_notebook_view
_
js.xml
View file @
2fdb9f31
...
...
@@ -87,7 +87,7 @@
</item>
<item>
<key>
<string>
id
</string>
</key>
<value>
<string>
gadget_officejs_jio_notebook_view
.
js
</string>
</value>
<value>
<string>
gadget_officejs_jio_notebook_view
_
js
</string>
</value>
</item>
<item>
<key>
<string>
language
</string>
</key>
...
...
@@ -244,7 +244,7 @@
</item>
<item>
<key>
<string>
serial
</string>
</key>
<value>
<string>
97
0.42986.60138.706
5
</string>
</value>
<value>
<string>
97
8.45737.52110.4360
5
</string>
</value>
</item>
<item>
<key>
<string>
state
</string>
</key>
...
...
@@ -262,7 +262,7 @@
</tuple>
<state>
<tuple>
<float>
15
38406432.04
</float>
<float>
15
69510411.18
</float>
<string>
UTC
</string>
</tuple>
</state>
...
...
bt5/erp5_officejs/PathTemplateItem/web_page_module/gadget_officejs_notebook.appcache.xml
View file @
2fdb9f31
...
...
@@ -111,7 +111,7 @@
<item>
<key>
<string>
text_content
</string>
</key>
<value>
<string>
CACHE MANIFEST\n
# generated on Fri, 01 Feb 2019
11:45
:33 +0000\n
# generated on Fri, 01 Feb 2019
41:46
:33 +0000\n
# XXX + fonts\n
# images/ajax-loader.gif\n
CACHE:\n
...
...
@@ -120,44 +120,37 @@ CACHE:\n
gadget_officejs_notebook.json\n
nexedi_logo_officejs_iodide.svg\n
gadget_officejs_notebook_router.html\n
gadget_erp5_page_execute_notebook.html\n
gadget_erp5_page_execute_notebook.js\n
gadget_officejs_jio_notebook_view.html\n
gadget_officejs_jio_notebook_view.js\n
gadget_officejs_jio_notebook.js\n
gadget_erp5_page_ojs_upload.js\n
gadget_erp5_page_ojs_upload.html\n
gadget_erp5_page_ojs_download.js\n
gadget_erp5_page_ojs_download.html\n
gadget_erp5_page_ojs_notebook_list.js\n
gadget_erp5_page_ojs_notebook_list.html\n
gadget_notebook.html\n
iodide_master.js\n
iodide_master.css\n
pyodide.js\n
pyodide.asm.data.js\n
pyodide.asm.js\n
pyodide.asm.wasm\n
pyodide.asm.data\n
gadget_jsmd_viewer.css\n
gadget_jsmd_viewer.html\n
gadget_jsmd_viewer.js\n
gadget_jsmd_eval.html\n
gadget_jsmd_eval.js\n
gadget_jsmd_eval.css\n
cycler.data\n
cycler.js\n
kiwisolver.data\n
kiwisolver.js\n
matplotlib.data\n
matplotlib.js\n
numpy.data\n
numpy.js\n
packages.json\n
pandas.data\n
pandas.js\n
pyodide.asm.html\n
pyodide.py\n
pyparsing.data\n
pyparsing.js\n
python-dateutil.data\n
python-dateutil.js\n
python.html\n
pytz.data\n
pytz.js\n
renderedhtml.css\n
xlrd.data\n
xlrd.js\n
\n
...
...
@@ -408,7 +401,7 @@ NETWORK:\n
</item>
<item>
<key>
<string>
serial
</string>
</key>
<value>
<string>
97
3.33482.4166.8669
</string>
</value>
<value>
<string>
97
8.45740.15084.15496
</string>
</value>
</item>
<item>
<key>
<string>
state
</string>
</key>
...
...
@@ -426,7 +419,7 @@ NETWORK:\n
</tuple>
<state>
<tuple>
<float>
15
49888313.28
</float>
<float>
15
69510591.31
</float>
<string>
UTC
</string>
</tuple>
</state>
...
...
bt5/erp5_officejs/PathTemplateItem/web_page_module/gadget_officejs_notebook_router.html.html
View file @
2fdb9f31
...
...
@@ -18,7 +18,10 @@
<script
data-renderjs-configuration=
"document_title"
type=
"text/x-renderjs-configuration"
>
Notebook
</script>
<script
data-renderjs-configuration=
"document_title_plural"
type=
"text/x-renderjs-configuration"
>
Notebooks
</script>
<script
data-renderjs-configuration=
"parent_relative_url"
type=
"text/x-renderjs-configuration"
>
notebook_module
</script>
<script
data-renderjs-configuration=
"erp5_attachment_synchro"
type=
"text/x-renderjs-configuration"
></script>
<script
data-renderjs-configuration=
"erp5_attachment_synchro"
type=
"text/x-renderjs-configuration"
>
/
{
+
id
}
/Base_downloadWithCors
</script>
<script
data-renderjs-configuration=
"content_type"
type=
"text/x-renderjs-configuration"
>
application
/
x
-
asc
-
notebook
</script>
<script
data-renderjs-configuration=
"file_extension"
type=
"text/x-renderjs-configuration"
>
html
</script>
<script
data-renderjs-configuration=
"conversion_dict"
type=
"text/x-renderjs-configuration"
>
{
"
html
"
:
[
"
pdf
"
,
"
txt
"
]}
</script>
<script
data-renderjs-configuration=
"upload_dict"
type=
"text/x-renderjs-configuration"
>
{
"
txt
"
:
"
txt
"
,
"
html
"
:
"
html
"
}
</script>
<script
data-renderjs-configuration=
"dropbox_app_key"
type=
"text/x-renderjs-configuration"
>
82
g9eir551nhovs
</script>
<div
data-gadget-url=
"gadget_erp5_router.html"
data-gadget-scope=
"erp5_router"
></div>
...
...
bt5/erp5_officejs/PathTemplateItem/web_page_module/gadget_officejs_notebook_router.html.xml
View file @
2fdb9f31
...
...
@@ -278,7 +278,7 @@
</item>
<item>
<key>
<string>
serial
</string>
</key>
<value>
<string>
97
0.52955.27100.34065
</string>
</value>
<value>
<string>
97
8.12315.2410.9523
</string>
</value>
</item>
<item>
<key>
<string>
state
</string>
</key>
...
...
@@ -296,7 +296,7 @@
</tuple>
<state>
<tuple>
<float>
15
39094329.81
</float>
<float>
15
67506038.67
</float>
<string>
UTC
</string>
</tuple>
</state>
...
...
bt5/erp5_officejs/PathTemplateItem/web_page_module/ojs_gadget_cloudooo_js.js
View file @
2fdb9f31
...
...
@@ -117,7 +117,7 @@
]);
})
.
push
(
function
(
result
)
{
return
jio_gadget
.
putAttachment
(
options
.
id
,
options
.
name
,
result
[
0
]);
return
jio_gadget
.
putAttachment
(
options
.
id
,
options
.
name
,
result
[
0
]
,
options
.
conversion_kw
);
})
.
push
(
function
()
{
return
jio_gadget
.
getAttachment
(
options
.
id
,
options
.
name
);
...
...
bt5/erp5_officejs/PathTemplateItem/web_page_module/ojs_gadget_cloudooo_js.xml
View file @
2fdb9f31
...
...
@@ -269,7 +269,7 @@
</item>
<item>
<key>
<string>
serial
</string>
</key>
<value>
<string>
9
69.46608.54855.3123
</string>
</value>
<value>
<string>
9
77.28694.830.42120
</string>
</value>
</item>
<item>
<key>
<string>
state
</string>
</key>
...
...
@@ -287,7 +287,7 @@
</tuple>
<state>
<tuple>
<float>
15
34778298.94
</float>
<float>
15
67086325.95
</float>
<string>
UTC
</string>
</tuple>
</state>
...
...
bt5/erp5_officejs/PathTemplateItem/web_page_module/ojs_gadget_erp5_page_ojs_download_html.html
View file @
2fdb9f31
...
...
@@ -4,14 +4,34 @@
<meta
charset=
"utf-8"
>
<meta
name=
"viewport"
content=
"width=device-width, initial-scale=1"
>
<title>
Gadget
OfficeJS Up
load
</title>
<title>
Gadget
Erp5 Page Ojs Cloudooo Down
load
</title>
<script
src=
"rsvp.js"
></script>
<script
src=
"renderjs.js"
></script>
<script
src=
"gadget_erp5_page_ojs_download.js"
></script>
<script
src=
"jspdf.js"
></script>
</head>
<body>
<form
class=
"save_form ui-body-c"
novalidate
>
<div
data-gadget-url=
"gadget_jsmd_viewer.html"
data-gadget-scope=
"editor"
data-gadget-sandbox=
"public"
>
</div>
<button
type=
"submit"
class=
"ui-btn ui-btn-b ui-btn-inline
ui-icon-edit ui-btn-icon-right ui-screen-hidden"
></button>
<div
data-gadget-url=
"gadget_erp5_pt_form_dialog.html"
data-gadget-scope=
"form_view"
data-gadget-sandbox=
"public"
>
</div>
<div
data-gadget-url=
"gadget_ojs_cloudooo.html"
data-gadget-scope=
"ojs_cloudooo"
data-gadget-sandbox=
"public"
>
</div>
</form>
</body>
</html>
\ No newline at end of file
bt5/erp5_officejs/PathTemplateItem/web_page_module/ojs_gadget_erp5_page_ojs_download_html.xml
View file @
2fdb9f31
...
...
@@ -242,7 +242,7 @@
</item>
<item>
<key>
<string>
serial
</string>
</key>
<value>
<string>
97
0.43008.48748.51541
</string>
</value>
<value>
<string>
97
7.28694.830.42120
</string>
</value>
</item>
<item>
<key>
<string>
state
</string>
</key>
...
...
@@ -260,7 +260,7 @@
</tuple>
<state>
<tuple>
<float>
15
38576879.18
</float>
<float>
15
67439047.79
</float>
<string>
UTC
</string>
</tuple>
</state>
...
...
bt5/erp5_officejs/PathTemplateItem/web_page_module/ojs_gadget_erp5_page_ojs_download_js.js
View file @
2fdb9f31
/*global window, rJS,
Blob
*/
/*global window, rJS,
RSVP
*/
/*jslint nomen: true, indent: 2, maxerr: 3 */
(
function
(
window
,
rJS
,
Blob
)
{
(
function
(
window
,
jIO
,
rJS
,
RSVP
,
Blob
,
DOMParser
)
{
"
use strict
"
;
function
downloadFromTextContent
(
gadget
,
text_content
,
title
)
{
function
downloadJsPdf
(
gadget
,
html
)
{
var
doc
=
new
jsPDF
();
var
specialElementHandlers
=
{};
doc
.
fromHTML
(
html
.
lastChild
.
innerHTML
,
15
,
15
,
{
'
width
'
:
170
,
'
elementHandlers
'
:
specialElementHandlers
});
doc
.
save
(
'
sample-content.pdf
'
);
}
//////////////////////////////////////////////////////
function
downloadTxt
(
gadget
)
{
var
element
=
gadget
.
element
,
a
=
window
.
document
.
createElement
(
"
a
"
),
url
=
window
.
URL
.
createObjectURL
(
new
Blob
([
gadget
.
state
.
doc
.
text_content
],
{
type
:
'
text/plain
'
})),
name_list
=
[
gadget
.
state
.
doc
.
title
,
"
txt
"
];
element
.
appendChild
(
a
);
a
.
style
=
"
display: none
"
;
a
.
href
=
url
;
a
.
download
=
name_list
.
join
(
'
.
'
);
a
.
click
();
element
.
removeChild
(
a
);
window
.
URL
.
revokeObjectURL
(
url
);
}
//////
function
downloadFromBlob
(
gadget
,
blob
,
format
)
{
var
element
=
gadget
.
element
,
a
=
window
.
document
.
createElement
(
"
a
"
),
url
=
window
.
URL
.
createObjectURL
(
new
Blob
([
text_content
],
{
type
:
'
text/plain
'
})),
name_list
=
[
title
,
"
txt
"
];
url
=
window
.
URL
.
createObjectURL
(
blob
),
name_list
=
gadget
.
state
.
doc
.
filename
.
split
(
'
.
'
);
name_list
[
name_list
.
length
-
1
]
=
format
;
element
.
appendChild
(
a
);
a
.
style
=
"
display: none
"
;
a
.
href
=
url
;
...
...
@@ -17,32 +46,184 @@
window
.
URL
.
revokeObjectURL
(
url
);
}
function
downloadFromFormat
(
gadget
,
format
)
{
return
gadget
.
getDeclaredGadget
(
'
ojs_cloudooo
'
)
.
push
(
function
(
ojs_cloudooo
)
{
return
ojs_cloudooo
.
getConvertedBlob
({
jio_key
:
gadget
.
state
.
jio_key
,
format
:
format
,
redirect
:
jIO
.
util
.
stringify
({
'
command
'
:
'
display
'
,
'
options
'
:
{
'
page
'
:
'
ojs_download
'
,
'
jio_key
'
:
gadget
.
state
.
jio_key
,
'
download_format
'
:
format
}
})
});
})
.
push
(
function
(
result
)
{
return
downloadFromBlob
(
gadget
,
result
,
format
);
})
.
push
(
function
()
{
return
gadget
.
notifySubmitted
();
},
function
(
error
)
{
if
(
error
instanceof
jIO
.
util
.
jIOError
)
{
return
gadget
.
notifySubmitted
({
message
:
"
Conversion Failed
"
,
status
:
"
error
"
});
}
throw
error
;
});
}
//////
function
addFileName
(
gadget
,
format
)
{
return
new
RSVP
.
Queue
()
.
push
(
function
()
{
var
doc
=
gadget
.
state
.
doc
;
var
name_list
=
[
doc
.
title
,
"
html
"
];
doc
.
filename
=
name_list
.
join
(
'
.
'
);
return
doc
;
})
.
push
(
function
(
doc
)
{
gadget
.
jio_put
(
gadget
.
state
.
jio_key
,
doc
);
})
.
push
(
function
()
{
downloadFromFormat
(
gadget
,
format
);
});
}
rJS
(
window
)
/////////////////////////////////////////////////////////////////
// Acquired methods
/////////////////////////////////////////////////////////////////
.
declareAcquiredMethod
(
"
getUrlFor
"
,
"
getUrlFor
"
)
.
declareAcquiredMethod
(
"
jio_get
"
,
"
jio_get
"
)
.
declareAcquiredMethod
(
"
getSetting
"
,
"
getSetting
"
)
.
declareAcquiredMethod
(
"
removeSetting
"
,
"
removeSetting
"
)
.
declareAcquiredMethod
(
"
updateHeader
"
,
"
updateHeader
"
)
.
declareAcquiredMethod
(
"
jio_put
"
,
"
jio_put
"
)
.
declareAcquiredMethod
(
"
notifySubmitting
"
,
"
notifySubmitting
"
)
.
declareAcquiredMethod
(
"
notifySubmitted
"
,
"
notifySubmitted
"
)
.
declareAcquiredMethod
(
"
redirect
"
,
"
redirect
"
)
.
declareAcquiredMethod
(
"
jio_get
"
,
"
jio_get
"
)
.
declareAcquiredMethod
(
"
jio_getAttachment
"
,
"
jio_getAttachment
"
)
.
declareAcquiredMethod
(
"
jio_putAttachment
"
,
"
jio_putAttachment
"
)
/////////////////////////////////////////////////////////////////
// declared methods
/////////////////////////////////////////////////////////////////
.
allowPublicAcquisition
(
'
submitContent
'
,
function
()
{
var
gadget
=
this
;
return
gadget
.
notifySubmitting
()
.
push
(
function
()
{
return
gadget
.
getDeclaredGadget
(
'
form_view
'
);
})
.
push
(
function
(
form_gadget
)
{
return
form_gadget
.
getContent
();
})
.
push
(
function
(
result
)
{
if
(
result
.
format
==
"
txt
"
)
{
downloadTxt
(
gadget
);
}
else
{
return
new
RSVP
.
Queue
()
.
push
(
function
()
{
addFileName
(
gadget
,
result
.
format
);
});
}
});
})
.
declareMethod
(
"
triggerSubmit
"
,
function
()
{
return
this
.
element
.
querySelector
(
'
button[type="submit"]
'
).
click
();
})
.
declareMethod
(
"
render
"
,
function
(
options
)
{
var
gadget
=
this
;
return
gadget
.
jio_get
(
options
.
jio_key
)
.
push
(
function
(
doc
)
{
return
downloadFromTextContent
(
gadget
,
doc
.
text_content
,
doc
.
title
);
return
new
RSVP
.
Queue
()
.
push
(
function
()
{
return
RSVP
.
all
([
gadget
.
jio_get
(
options
.
jio_key
),
gadget
.
getSetting
(
"
file_extension
"
,
""
)
]);
})
.
push
(
function
(
result
)
{
return
gadget
.
changeState
({
jio_key
:
options
.
jio_key
,
doc
:
result
[
0
],
format
:
result
[
1
],
download_format
:
options
.
download_format
,
editable
:
options
.
editable
});
});
})
.
onStateChange
(
function
()
{
var
gadget
=
this
,
format_list
;
return
gadget
.
getSetting
(
'
conversion_dict
'
,
{})
.
push
(
function
(
conversion_dict
)
{
format_list
=
window
.
JSON
.
parse
(
conversion_dict
)[
gadget
.
state
.
format
];
format_list
.
push
(
gadget
.
state
.
format
);
return
gadget
.
getDeclaredGadget
(
'
form_view
'
);
})
.
push
(
function
()
{
return
gadget
.
redirect
({
'
command
'
:
'
display
'
,
'
options
'
:
{
'
jio_key
'
:
options
.
jio_key
.
push
(
function
(
form_gadget
)
{
return
form_gadget
.
render
({
erp5_document
:
{
"
_embedded
"
:
{
"
_view
"
:
{
"
_actions
"
:
{
"
put
"
:
{}},
"
form_id
"
:
{},
"
dialog_id
"
:
{},
"
my_format
"
:
{
"
title
"
:
"
Format Avaible
"
,
"
required
"
:
1
,
"
editable
"
:
1
,
"
key
"
:
"
format
"
,
"
value
"
:
gadget
.
state
.
format
,
"
items
"
:
format_list
,
"
type
"
:
"
ListField
"
}
}},
"
_links
"
:
{
"
type
"
:
{
// form_list display portal_type in header
name
:
""
}
}
},
form_definition
:
{
title
:
"
Download
"
,
group_list
:
[[
"
center
"
,
[[
"
my_format
"
]]
]]
}
});
})
.
push
(
function
()
{
return
RSVP
.
all
([
gadget
.
getUrlFor
({
command
:
'
display
'
,
options
:
{
'
jio_key
'
:
gadget
.
state
.
jio_key
}
}),
gadget
.
getUrlFor
({
command
:
'
selection_previous
'
}),
gadget
.
getUrlFor
({
command
:
'
selection_next
'
})
]);
})
.
push
(
function
(
url_list
)
{
return
gadget
.
updateHeader
({
page_title
:
"
Download
"
,
selection_url
:
url_list
[
0
],
previous_url
:
url_list
[
1
],
next_url
:
url_list
[
2
]
});
})
.
push
(
function
()
{
if
(
gadget
.
state
.
download_format
)
{
return
downloadFromFormat
(
gadget
,
gadget
.
state
.
download_format
);
}
});
});
}(
window
,
rJS
,
Blob
));
\ No newline at end of file
}(
window
,
jIO
,
rJS
,
RSVP
,
Blob
,
DOMParser
));
bt5/erp5_officejs/PathTemplateItem/web_page_module/ojs_gadget_erp5_page_ojs_download_js.xml
View file @
2fdb9f31
...
...
@@ -242,7 +242,7 @@
</item>
<item>
<key>
<string>
serial
</string>
</key>
<value>
<string>
97
0.45827.27759.62020
</string>
</value>
<value>
<string>
97
8.12190.27831.30242
</string>
</value>
</item>
<item>
<key>
<string>
state
</string>
</key>
...
...
@@ -260,7 +260,7 @@
</tuple>
<state>
<tuple>
<float>
15
39074452.96
</float>
<float>
15
67510101.11
</float>
<string>
UTC
</string>
</tuple>
</state>
...
...
bt5/erp5_officejs/PathTemplateItem/web_page_module/ojs_gadget_ojs_cloudooo_js.js
View file @
2fdb9f31
...
...
@@ -100,6 +100,7 @@
from
:
options
.
format
,
to
:
format_list
[
i
],
id
:
options
.
jio_key
,
conversion_kw
:
options
.
conversion_kw
?
options
.
conversion_kw
:
{},
name
:
options
.
format
===
result
[
1
]
?
ATT_NAME
:
options
.
format
}));
}
...
...
bt5/erp5_officejs/PathTemplateItem/web_page_module/ojs_gadget_ojs_cloudooo_js.xml
View file @
2fdb9f31
...
...
@@ -269,7 +269,7 @@
</item>
<item>
<key>
<string>
serial
</string>
</key>
<value>
<string>
9
69.46486.51629.28689
</string>
</value>
<value>
<string>
9
77.28694.830.42120
</string>
</value>
</item>
<item>
<key>
<string>
state
</string>
</key>
...
...
@@ -287,7 +287,7 @@
</tuple>
<state>
<tuple>
<float>
15
34770737.04
</float>
<float>
15
67077855.95
</float>
<string>
UTC
</string>
</tuple>
</state>
...
...
bt5/erp5_officejs/bt/dependency_list
View file @
2fdb9f31
erp5_web_renderjs_ui
erp5_code_mirror
erp5_multimedia
erp5_notebook
erp5_smart_assistant
\ No newline at end of file
bt5/erp5_officejs_ui_test/PathTemplateItem/portal_tests/officejs_ui_notebook_zuite/%20testOfficejsNotebookErp5Synchronization.xml
0 → 100644
View file @
2fdb9f31
<?xml version="1.0"?>
<ZopeData>
<record
id=
"1"
aka=
"AAAAAAAAAAE="
>
<pickle>
<global
name=
"ZopePageTemplate"
module=
"Products.PageTemplates.ZopePageTemplate"
/>
</pickle>
<pickle>
<dictionary>
<item>
<key>
<string>
_bind_names
</string>
</key>
<value>
<object>
<klass>
<global
name=
"NameAssignments"
module=
"Shared.DC.Scripts.Bindings"
/>
</klass>
<tuple/>
<state>
<dictionary>
<item>
<key>
<string>
_asgns
</string>
</key>
<value>
<dictionary>
<item>
<key>
<string>
name_subpath
</string>
</key>
<value>
<string>
traverse_subpath
</string>
</value>
</item>
</dictionary>
</value>
</item>
</dictionary>
</state>
</object>
</value>
</item>
<item>
<key>
<string>
content_type
</string>
</key>
<value>
<string>
text/html
</string>
</value>
</item>
<item>
<key>
<string>
expand
</string>
</key>
<value>
<int>
0
</int>
</value>
</item>
<item>
<key>
<string>
id
</string>
</key>
<value>
<string>
testOfficejsNotebookErp5Synchronization
</string>
</value>
</item>
<item>
<key>
<string>
output_encoding
</string>
</key>
<value>
<string>
utf-8
</string>
</value>
</item>
<item>
<key>
<string>
title
</string>
</key>
<value>
<unicode></unicode>
</value>
</item>
</dictionary>
</pickle>
</record>
</ZopeData>
bt5/erp5_officejs_ui_test/PathTemplateItem/portal_tests/officejs_ui_notebook_zuite/%20testOfficejsNotebookErp5Synchronization.zpt
0 → 100644
View file @
2fdb9f31
<html>
<head>
<title
tal:content=
"template/title"
>
The title
</title>
<meta
http-equiv=
"content-type"
content=
"text/html;charset=utf-8"
>
</head>
<body>
<table
cellpadding=
"1"
cellspacing=
"1"
border=
"1"
>
<thead>
<tr><td
rowspan=
"1"
colspan=
"3"
>
Test OfficeJS Notebook UI
</td></tr>
</thead>
<tbody>
<tal:block
metal:use-macro=
"here/Zuite_CommonTemplate/macros/init"
/>
<!-- Clean Up -->
<tr>
<td>
open
</td>
<td>
${base_url}/web_site_module/officejs_notebook/
</td>
<td></td>
</tr>
<tr>
<td>
waitForElementPresent
</td>
<td>
//a[@data-i18n="Storages"]
</td>
<td></td>
</tr>
<tr>
<td>
click
</td>
<td>
//a[@data-i18n="Storages"]
</td>
<td></td>
</tr>
<tr>
<td>
waitForElementPresent
</td>
<td>
link=Erp5
</td>
<td></td>
</tr>
<tr>
<td>
click
</td>
<td>
link=Erp5
</td>
<td></td>
</tr>
<tr>
<td>
waitForElementPresent
</td>
<td>
name=erp5_url
</td>
<td></td>
</tr>
<tr>
<td>
type
</td>
<td>
name=erp5_url
</td>
<td>
${base_url}/web_site_module/renderjs_runner/
</td>
</tr>
<tr>
<td>
click
</td>
<td>
name=submit
</td>
<td></td>
</tr>
<tr>
<td>
waitForElementPresent
</td>
<td>
link=Add
</td>
<td></td>
</tr>
<tr>
<td>
click
</td>
<td>
link=Add
</td>
<td></td>
</tr>
<tr>
<td>
waitForElementPresent
</td>
<td>
//button[@data-i18n='Save']
</td>
<td></td>
</tr>
<tr>
<td>
waitForElementPresent
</td>
<td>
id=title
</td>
<td></td>
</tr>
<tr>
<td>
store
</td>
<td
tal:content=
"python: 'test_text_%s' % DateTime().strftime('%Y%m%d%H%M%S')"
>
Titre
</td>
<td>
title
</td>
</tr>
<tr>
<td>
store
</td>
<td
tal:content=
"python: 'Test Reference %s' % DateTime()"
>
Reference
</td>
<td>
reference
</td>
</tr>
<tr>
<td>
store
</td>
<td
tal:content=
"python: 'Test Language %s' % DateTime()"
>
Language
</td>
<td>
language
</td>
</tr>
<tr>
<td>
store
</td>
<td
tal:content=
"python: 'Test Version %s' % DateTime()"
>
Version
</td>
<td>
version
</td>
</tr>
<tr>
<td>
store
</td>
<td
tal:content=
"python: 'Test Description %s' % DateTime()"
>
Description
</td>
<td>
description
</td>
</tr>
<tr>
<td>
waitForElementPresent
</td>
<td>
//input[@title='Title']
</td>
<td></td>
</tr>
<tr>
<td>
type
</td>
<td>
//input[@title='Title']
</td>
<td>
${title}
</td>
</tr>
<tr>
<td>
type
</td>
<td>
//input[@title='Reference']
</td>
<td>
${reference}
</td>
</tr>
<tr>
<td>
type
</td>
<td>
//input[@title='Version']
</td>
<td>
${version}
</td>
</tr>
<tr>
<td>
type
</td>
<td>
//input[@title='Language']
</td>
<td>
${language}
</td>
</tr>
<tr>
<td>
type
</td>
<td>
//textarea[@title='Description']
</td>
<td>
${description}
</td>
</tr>
<tr>
<td>
click
</td>
<td>
//button[@class="ui-icon-expand ui-btn-icon-notext"]
</td>
<td></td>
</tr>
<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:define-macro=
"synchronization_document"
>
<tr>
<td
colspan=
"3"
><b>
Sync Document
</b></td>
</tr>
<tr>
<td>
click
</td>
<td>
//a[@data-i18n="Synchronize"]
</td>
<td></td>
</tr>
</tal:block>
<tr>
<td>
waitForElementPresent
</td>
<td>
//button[@data-i18n='Filter']
</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>
<tr>
<td>
waitForElementPresent
</td>
<td>
identifier=title
</td>
<td></td>
</tr>
<tr>
<td>
verifyValue
</td>
<td>
title
</td>
<td>
${title}
</td>
</tr>
<tr>
<td>
verifyValue
</td>
<td>
reference
</td>
<td>
${reference}
</td>
</tr>
<tr>
<td>
verifyValue
</td>
<td>
version
</td>
<td>
${version}
</td>
</tr>
<tr>
<td>
verifyValue
</td>
<td>
language
</td>
<td>
${language}
</td>
</tr>
<tr>
<td>
verifyValue
</td>
<td>
description
</td>
<td>
${description}
</td>
</tr>
</tbody>
</table>
</body>
</html>
\ No newline at end of file
bt5/erp5_officejs_ui_test/PathTemplateItem/portal_tests/officejs_ui_notebook_zuite/testOfficejsNotebookExport.xml
0 → 100644
View file @
2fdb9f31
<?xml version="1.0"?>
<ZopeData>
<record
id=
"1"
aka=
"AAAAAAAAAAE="
>
<pickle>
<global
name=
"ZopePageTemplate"
module=
"Products.PageTemplates.ZopePageTemplate"
/>
</pickle>
<pickle>
<dictionary>
<item>
<key>
<string>
_bind_names
</string>
</key>
<value>
<object>
<klass>
<global
name=
"NameAssignments"
module=
"Shared.DC.Scripts.Bindings"
/>
</klass>
<tuple/>
<state>
<dictionary>
<item>
<key>
<string>
_asgns
</string>
</key>
<value>
<dictionary>
<item>
<key>
<string>
name_subpath
</string>
</key>
<value>
<string>
traverse_subpath
</string>
</value>
</item>
</dictionary>
</value>
</item>
</dictionary>
</state>
</object>
</value>
</item>
<item>
<key>
<string>
content_type
</string>
</key>
<value>
<string>
text/html
</string>
</value>
</item>
<item>
<key>
<string>
expand
</string>
</key>
<value>
<int>
0
</int>
</value>
</item>
<item>
<key>
<string>
id
</string>
</key>
<value>
<string>
testOfficejsNotebookExport
</string>
</value>
</item>
<item>
<key>
<string>
output_encoding
</string>
</key>
<value>
<string>
utf-8
</string>
</value>
</item>
<item>
<key>
<string>
title
</string>
</key>
<value>
<unicode></unicode>
</value>
</item>
</dictionary>
</pickle>
</record>
</ZopeData>
bt5/erp5_officejs_ui_test/PathTemplateItem/portal_tests/officejs_ui_notebook_zuite/testOfficejsNotebookExport.zpt
0 → 100644
View file @
2fdb9f31
<html>
<head>
<title
tal:content=
"template/title"
>
The title
</title>
<meta
http-equiv=
"content-type"
content=
"text/html;charset=utf-8"
>
</head>
<body>
<table
cellpadding=
"1"
cellspacing=
"1"
border=
"1"
>
<thead>
<tr><td
rowspan=
"1"
colspan=
"3"
>
Test OfficeJS Notebook UI
</td></tr>
</thead>
<tbody>
<tal:block
metal:use-macro=
"here/Zuite_CommonTemplate/macros/init"
/>
<!-- Clean Up -->
<tr>
<td>
open
</td>
<td>
${base_url}/web_site_module/officejs_notebook/
</td>
<td></td>
</tr>
<tr>
<td>
waitForElementPresent
</td>
<td>
//a[@data-i18n="Storages"]
</td>
<td></td>
</tr>
<tr>
<td>
click
</td>
<td>
//a[@data-i18n="Storages"]
</td>
<td></td>
</tr>
<tr>
<td>
waitForElementPresent
</td>
<td>
link=Erp5
</td>
<td></td>
</tr>
<tr>
<td>
click
</td>
<td>
link=Erp5
</td>
<td></td>
</tr>
<tr>
<td>
waitForElementPresent
</td>
<td>
name=erp5_url
</td>
<td></td>
</tr>
<tr>
<td>
type
</td>
<td>
name=erp5_url
</td>
<td>
${base_url}/web_site_module/renderjs_runner/
</td>
</tr>
<tr>
<td>
click
</td>
<td>
name=submit
</td>
<td></td>
</tr>
<tr>
<td>
waitForElementPresent
</td>
<td>
link=Add
</td>
<td></td>
</tr>
<tr>
<td>
click
</td>
<td>
link=Add
</td>
<td></td>
</tr>
<tr>
<td>
waitForElementPresent
</td>
<td>
//button[@data-i18n='Save']
</td>
<td></td>
</tr>
<tr>
<td>
waitForElementPresent
</td>
<td>
id=title
</td>
<td></td>
</tr>
<tr>
<td>
store
</td>
<td
tal:content=
"python: 'test_text_%s' % DateTime().strftime('%Y%m%d%H%M%S')"
>
Titre
</td>
<td>
title
</td>
</tr>
<tr>
<td>
store
</td>
<td
tal:content=
"python: 'Test Reference %s' % DateTime()"
>
Reference
</td>
<td>
reference
</td>
</tr>
<tr>
<td>
store
</td>
<td
tal:content=
"python: 'Test Language %s' % DateTime()"
>
Language
</td>
<td>
language
</td>
</tr>
<tr>
<td>
store
</td>
<td
tal:content=
"python: 'Test Version %s' % DateTime()"
>
Version
</td>
<td>
version
</td>
</tr>
<tr>
<td>
store
</td>
<td
tal:content=
"python: 'Test Description %s' % DateTime()"
>
Description
</td>
<td>
description
</td>
</tr>
<tr>
<td>
waitForElementPresent
</td>
<td>
//span[@role="presentation"]
</td>
<td></td>
</tr>
<tr>
<td>
type
</td>
<td>
//input[@title='Title']
</td>
<td>
${title}
</td>
</tr>
<tr>
<td>
type
</td>
<td>
//input[@title='Reference']
</td>
<td>
${reference}
</td>
</tr>
<tr>
<td>
type
</td>
<td>
//input[@title='Version']
</td>
<td>
${version}
</td>
</tr>
<tr>
<td>
type
</td>
<td>
//input[@title='Language']
</td>
<td>
${language}
</td>
</tr>
<tr>
<td>
type
</td>
<td>
//textarea[@title='Description']
</td>
<td>
${description}
</td>
</tr>
<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>
<tr>
<td>
click
</td>
<td>
//a[@data-i18n="Synchronize"]
</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>
<tr>
<td>
waitForElementPresent
</td>
<td>
//button[@value='Execute']
</td>
<td></td>
</tr>
<tr>
<td>
click
</td>
<td>
//button[@value='Execute']
</td>
<td></td>
</tr>
<tr>
<td>
waitForElementPresent
</td>
<td>
//iframe[@src="https://softinst116586.host.vifib.net/erp5/web_site_module/officejs_notebook/app/gadget_jsmd_viewer.html"]
</td>
<td></td>
</tr>
<tr>
<td>
setSpeed
</td>
<td>
2000
</td>
<td></td>
</tr>
<tr>
<td>
click
</td>
<td>
//a[@data-i18n="Export"]
</td>
<td></td>
</tr>
<tr>
<td>
setSpeed
</td>
<td>
0
</td>
<td></td>
</tr>
<tr>
<td>
waitForElementPresent
</td>
<td>
//select[@id="format"]
</td>
<td></td>
</tr>
<tr>
<td>
select
</td>
<td>
//select[@id="format"]
</td>
<td>
value=pdf
</td>
</tr>
<tr>
<td>
click
</td>
<td>
//input[@type="submit"]
</td>
<td></td>
</tr>
<tr>
<td>
waitForElementPresent
</td>
<td>
//select[@id="format"]
</td>
<td></td>
</tr>
<tr>
<td>
select
</td>
<td>
//select[@id="format"]
</td>
<td>
value=html
</td>
</tr>
<tr>
<td>
click
</td>
<td>
//input[@type="submit"]
</td>
<td></td>
</tr>
<tr>
<td>
waitForElementPresent
</td>
<td>
//select[@id="format"]
</td>
<td></td>
</tr>
<tr>
<td>
select
</td>
<td>
//select[@id="format"]
</td>
<td>
value=txt
</td>
</tr>
<tr>
<td>
click
</td>
<td>
//input[@type="submit"]
</td>
<td></td>
</tr>
<tr>
<td>
waitForElementPresent
</td>
<td>
//a[@data-i18n="Cancel"]
</td>
<td></td>
</tr>
<tr>
<td>
click
</td>
<td>
//a[@data-i18n="Cancel"]
</td>
<td></td>
</tr>
</tbody>
</table>
</body>
</html>
\ No newline at end of file
bt5/erp5_officejs_ui_test/PathTemplateItem/portal_tests/officejs_ui_notebook_zuite/testOfficsjsNotebook.xml
0 → 100644
View file @
2fdb9f31
<?xml version="1.0"?>
<ZopeData>
<record
id=
"1"
aka=
"AAAAAAAAAAE="
>
<pickle>
<global
name=
"ZopePageTemplate"
module=
"Products.PageTemplates.ZopePageTemplate"
/>
</pickle>
<pickle>
<dictionary>
<item>
<key>
<string>
_bind_names
</string>
</key>
<value>
<object>
<klass>
<global
name=
"NameAssignments"
module=
"Shared.DC.Scripts.Bindings"
/>
</klass>
<tuple/>
<state>
<dictionary>
<item>
<key>
<string>
_asgns
</string>
</key>
<value>
<dictionary>
<item>
<key>
<string>
name_subpath
</string>
</key>
<value>
<string>
traverse_subpath
</string>
</value>
</item>
</dictionary>
</value>
</item>
</dictionary>
</state>
</object>
</value>
</item>
<item>
<key>
<string>
content_type
</string>
</key>
<value>
<string>
text/html
</string>
</value>
</item>
<item>
<key>
<string>
expand
</string>
</key>
<value>
<int>
0
</int>
</value>
</item>
<item>
<key>
<string>
id
</string>
</key>
<value>
<string>
testOfficsjsNotebook
</string>
</value>
</item>
<item>
<key>
<string>
output_encoding
</string>
</key>
<value>
<string>
utf-8
</string>
</value>
</item>
<item>
<key>
<string>
title
</string>
</key>
<value>
<unicode></unicode>
</value>
</item>
</dictionary>
</pickle>
</record>
</ZopeData>
bt5/erp5_officejs_ui_test/PathTemplateItem/portal_tests/officejs_ui_notebook_zuite/testOfficsjsNotebook.zpt
0 → 100644
View file @
2fdb9f31
<html>
<head>
<title
tal:content=
"template/title"
>
Test OfficeJS Notebook UI
</title>
<meta
http-equiv=
"content-type"
content=
"text/html;charset=utf-8"
>
</head>
<body>
<table
cellpadding=
"1"
cellspacing=
"1"
border=
"1"
>
<thead>
<tr><td
rowspan=
"1"
colspan=
"3"
>
Test OfficeJS Notebook UI
</td></tr>
</thead>
<tbody>
<tal:block
metal:use-macro=
"here/Zuite_CommonTemplate/macros/init"
/>
<!-- Clean Up -->
<tr>
<td>
open
</td>
<td>
${base_url}/web_site_module/officejs_notebook/
</td>
<td></td>
</tr>
<tr>
<td>
waitForElementPresent
</td>
<td>
//a[@data-i18n="Storages"]
</td>
<td></td>
</tr>
<tr>
<td>
click
</td>
<td>
//a[@data-i18n="Storages"]
</td>
<td></td>
</tr>
<tr>
<td>
waitForElementPresent
</td>
<td>
link=Local is Enough
</td>
<td></td>
</tr>
<tr>
<td>
click
</td>
<td>
link=Local is Enough
</td>
<td></td>
</tr>
<tr>
<td>
waitForElementPresent
</td>
<td>
link=Add
</td>
<td></td>
</tr>
<tr>
<td>
click
</td>
<td>
link=Add
</td>
<td></td>
</tr>
<tr>
<td>
waitForElementPresent
</td>
<td>
//button[@data-i18n="Save"]
</td>
<td></td>
</tr>
<tr>
<td>
store
</td>
<td
tal:content=
"python: 'test_text_%s' % DateTime().strftime('%Y%m%d%H%M%S')"
>
Titre
</td>
<td>
title
</td>
</tr>
<tr>
<td>
store
</td>
<td
tal:content=
"python: 'Test Reference %s' % DateTime()"
>
Reference
</td>
<td>
reference
</td>
</tr>
<tr>
<td>
store
</td>
<td
tal:content=
"python: 'Test Language %s' % DateTime()"
>
Language
</td>
<td>
language
</td>
</tr>
<tr>
<td>
store
</td>
<td
tal:content=
"python: 'Test Version %s' % DateTime()"
>
Version
</td>
<td>
version
</td>
</tr>
<tr>
<td>
store
</td>
<td
tal:content=
"python: 'Test Description %s' % DateTime()"
>
Description
</td>
<td>
description
</td>
</tr>
<tr>
<td>
waitForElementPresent
</td>
<td>
//input[@title='Title']
</td>
<td></td>
</tr>
<tr>
<td>
type
</td>
<td>
//input[@title='Title']
</td>
<td>
${title}
</td>
</tr>
<tr>
<td>
type
</td>
<td>
//input[@title='Reference']
</td>
<td>
${reference}
</td>
</tr>
<tr>
<td>
type
</td>
<td>
//input[@title='Version']
</td>
<td>
${version}
</td>
</tr>
<tr>
<td>
type
</td>
<td>
//input[@title='Language']
</td>
<td>
${language}
</td>
</tr>
<tr>
<td>
type
</td>
<td>
//textarea[@title='Description']
</td>
<td>
${description}
</td>
</tr>
<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>
<tr>
<td>
click
</td>
<td>
//a[@accesskey="s"]
</td>
<td></td>
</tr>
<tr>
<td>
waitForElementPresent
</td>
<td>
//a[@data-i18n='Upload']
</td>
<td></td>
</tr>
<tr>
<td>
click
</td>
<td>
//a[@data-i18n='Upload']
</td>
<td></td>
</tr>
<tr>
<td>
waitForElementPresent
</td>
<td>
//input[@value='Upload']
</td>
<td></td>
</tr>
<tr>
<td>
click
</td>
<td>
//a[@data-i18n="Cancel"]
</td>
<td></td>
</tr>
<tr>
<td>
waitForElementPresent
</td>
<td>
//a[@accesskey="s"]
</td>
<td></td>
</tr>
<tal:block
metal:define-macro=
"open_document_with_title"
>
<tr>
<td
colspan=
"3"
><b>
Open Document
</b></td>
</tr>
<tr>
<td>
waitForElementPresent
</td>
<td>
//div[contains(@data-gadget-url, 'gadget_erp5_pt_form_list.html')]//input[@name='search']
</td>
<td></td>
</tr>
<tr>
<td>
type
</td>
<td>
//div[contains(@data-gadget-url, 'gadget_erp5_pt_form_list.html')]//input[@name='search']
</td>
<td>
${title}
</td>
</tr>
<tr>
<td>
click
</td>
<td>
//div[contains(@data-gadget-url, 'gadget_erp5_pt_form_list.html')]//div[@data-gadget-scope='erp5_searchfield']//button[contains(@class, 'search_button')]
</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>
<tr>
<td>
waitForElementPresent
</td>
<td>
//textarea[@title='Description']
</td>
<td></td>
</tr>
<tr>
<td>
verifyValue
</td>
<td>
//input[@title='Title']
</td>
<td>
${title}
</td>
</tr>
<tr>
<td>
verifyValue
</td>
<td>
//input[@title='Reference']
</td>
<td>
${reference}
</td>
</tr>
<tr>
<td>
verifyValue
</td>
<td>
//input[@title='Version']
</td>
<td>
${version}
</td>
</tr>
<tr>
<td>
verifyValue
</td>
<td>
//input[@title='Language']
</td>
<td>
${language}
</td>
</tr>
<tr>
<td>
verifyValue
</td>
<td>
//textarea[@title='Description']
</td>
<td>
${description}
</td>
</tr>
<tr>
<td>
waitForElementPresent
</td>
<td>
//button[@value='Edit']
</td>
<td></td>
</tr>
<tr>
<td>
click
</td>
<td>
//button[@value='Edit']
</td>
<td></td>
</tr>
<tr>
<td>
assertEditable
</td>
<td>
//input[@title='Title']
</td>
<td></td>
</tr>
<tr>
<td>
assertEditable
</td>
<td>
//input[@title='Reference']
</td>
<td></td>
</tr>
<tr>
<td>
assertEditable
</td>
<td>
//input[@title='Version']
</td>
<td></td>
</tr>
<tr>
<td>
assertEditable
</td>
<td>
//input[@title='Language']
</td>
<td></td>
</tr>
<tr>
<td>
assertEditable
</td>
<td>
//textarea[@title='Description']
</td>
<td></td>
</tr>
<tr>
<td>
waitForElementPresent
</td>
<td>
//div[@data-gadget-scope="editor"]//iframe
</td>
<td></td>
</tr>
<tr>
<td>
assertElementPresent
</td>
<td>
//iframe[@src="https://softinst116586.host.vifib.net/erp5/web_site_module/officejs_notebook/app/codemirror.gadget.html"]
</td>
<td></td>
</tr>
<tr>
<td>
waitForElementPresent
</td>
<td>
//button[@value='Execute']
</td>
<td></td>
</tr>
<tr>
<td>
click
</td>
<td>
//button[@value='Execute']
</td>
<td></td>
</tr>
<tr>
<td>
waitForElementPresent
</td>
<td>
//pre[@id='description']
</td>
<td></td>
</tr>
<tr>
<td>
assertElementPresent
</td>
<td>
//p[@id='title']
</td>
<td></td>
</tr>
<tr>
<td>
assertElementPresent
</td>
<td>
//p[@id='reference']
</td>
<td></td>
</tr>
<tr>
<td>
assertElementPresent
</td>
<td>
//p[@id='version']
</td>
<td></td>
</tr>
<tr>
<td>
assertElementPresent
</td>
<td>
//p[@id='language']
</td>
<td></td>
</tr>
<tr>
<td>
assertElementPresent
</td>
<td>
//pre[@id='description']
</td>
<td></td>
</tr>
<tr>
<td>
waitForElementPresent
</td>
<td>
//div[@data-gadget-scope="editor"]//iframe[@src="https://softinst116586.host.vifib.net/erp5/web_site_module/officejs_notebook/app/gadget_jsmd_viewer.html"]
</td>
<td></td>
</tr>
<tr>
<td>
assertElementPresent
</td>
<td>
//iframe[@src="https://softinst116586.host.vifib.net/erp5/web_site_module/officejs_notebook/app/gadget_jsmd_viewer.html"]
</td>
<td></td>
</tr>
</tbody>
</table>
</body>
</html>
\ No newline at end of file
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