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
Leo Le Bouter
erp5
Commits
6c6488e7
Commit
6c6488e7
authored
Jun 14, 2018
by
Vincent Bechu
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
[erp5_officejs_ooffice] Add conversion properties in onlyoffice apps
parent
9388e6a8
Changes
21
Show whitespace changes
Inline
Side-by-side
Showing
21 changed files
with
345 additions
and
104 deletions
+345
-104
bt5/erp5_officejs_ooffice/PathTemplateItem/web_page_module/gadget_ooffice_jio_presentation_view_html.html
...age_module/gadget_ooffice_jio_presentation_view_html.html
+4
-0
bt5/erp5_officejs_ooffice/PathTemplateItem/web_page_module/gadget_ooffice_jio_presentation_view_html.xml
...page_module/gadget_ooffice_jio_presentation_view_html.xml
+9
-3
bt5/erp5_officejs_ooffice/PathTemplateItem/web_page_module/gadget_ooffice_jio_presentation_view_js.js
...eb_page_module/gadget_ooffice_jio_presentation_view_js.js
+60
-20
bt5/erp5_officejs_ooffice/PathTemplateItem/web_page_module/gadget_ooffice_jio_presentation_view_js.xml
...b_page_module/gadget_ooffice_jio_presentation_view_js.xml
+9
-3
bt5/erp5_officejs_ooffice/PathTemplateItem/web_page_module/gadget_ooffice_jio_spreadsheet_view_html.html
...page_module/gadget_ooffice_jio_spreadsheet_view_html.html
+4
-0
bt5/erp5_officejs_ooffice/PathTemplateItem/web_page_module/gadget_ooffice_jio_spreadsheet_view_html.xml
..._page_module/gadget_ooffice_jio_spreadsheet_view_html.xml
+9
-3
bt5/erp5_officejs_ooffice/PathTemplateItem/web_page_module/gadget_ooffice_jio_spreadsheet_view_js.js
...web_page_module/gadget_ooffice_jio_spreadsheet_view_js.js
+59
-19
bt5/erp5_officejs_ooffice/PathTemplateItem/web_page_module/gadget_ooffice_jio_spreadsheet_view_js.xml
...eb_page_module/gadget_ooffice_jio_spreadsheet_view_js.xml
+9
-3
bt5/erp5_officejs_ooffice/PathTemplateItem/web_page_module/gadget_ooffice_jio_text_view_html.html
...em/web_page_module/gadget_ooffice_jio_text_view_html.html
+4
-0
bt5/erp5_officejs_ooffice/PathTemplateItem/web_page_module/gadget_ooffice_jio_text_view_html.xml
...tem/web_page_module/gadget_ooffice_jio_text_view_html.xml
+9
-3
bt5/erp5_officejs_ooffice/PathTemplateItem/web_page_module/gadget_ooffice_jio_text_view_js.js
...teItem/web_page_module/gadget_ooffice_jio_text_view_js.js
+59
-19
bt5/erp5_officejs_ooffice/PathTemplateItem/web_page_module/gadget_ooffice_jio_text_view_js.xml
...eItem/web_page_module/gadget_ooffice_jio_text_view_js.xml
+9
-3
bt5/erp5_officejs_ooffice/PathTemplateItem/web_page_module/gadget_ooffice_presentation_appcache.xml
.../web_page_module/gadget_ooffice_presentation_appcache.xml
+23
-6
bt5/erp5_officejs_ooffice/PathTemplateItem/web_page_module/gadget_ooffice_presentation_router_html.html
..._page_module/gadget_ooffice_presentation_router_html.html
+2
-0
bt5/erp5_officejs_ooffice/PathTemplateItem/web_page_module/gadget_ooffice_presentation_router_html.xml
...b_page_module/gadget_ooffice_presentation_router_html.xml
+9
-3
bt5/erp5_officejs_ooffice/PathTemplateItem/web_page_module/gadget_ooffice_spreadsheet_appcache.xml
...m/web_page_module/gadget_ooffice_spreadsheet_appcache.xml
+22
-6
bt5/erp5_officejs_ooffice/PathTemplateItem/web_page_module/gadget_ooffice_spreadsheet_router_html.html
...b_page_module/gadget_ooffice_spreadsheet_router_html.html
+2
-0
bt5/erp5_officejs_ooffice/PathTemplateItem/web_page_module/gadget_ooffice_spreadsheet_router_html.xml
...eb_page_module/gadget_ooffice_spreadsheet_router_html.xml
+9
-3
bt5/erp5_officejs_ooffice/PathTemplateItem/web_page_module/gadget_ooffice_text_appcache.xml
...lateItem/web_page_module/gadget_ooffice_text_appcache.xml
+22
-6
bt5/erp5_officejs_ooffice/PathTemplateItem/web_page_module/gadget_ooffice_text_router.html.html
...Item/web_page_module/gadget_ooffice_text_router.html.html
+3
-1
bt5/erp5_officejs_ooffice/PathTemplateItem/web_page_module/gadget_ooffice_text_router.html.xml
...eItem/web_page_module/gadget_ooffice_text_router.html.xml
+9
-3
No files found.
bt5/erp5_officejs_ooffice/PathTemplateItem/web_page_module/gadget_ooffice_jio_presentation_view_html.html
View file @
6c6488e7
...
...
@@ -22,5 +22,9 @@
data-gadget-sandbox=
"public"
>
</div>
</form>
<div
data-gadget-url=
"gadget_ojs_cloudooo.html"
data-gadget-scope=
"ojs_cloudooo"
data-gadget-sandbox=
"public"
>
</div>
</body>
</html>
bt5/erp5_officejs_ooffice/PathTemplateItem/web_page_module/gadget_ooffice_jio_presentation_view_html.xml
View file @
6c6488e7
...
...
@@ -60,6 +60,12 @@
</tuple>
</value>
</item>
<item>
<key>
<string>
categories
</string>
</key>
<value>
<tuple/>
</value>
</item>
<item>
<key>
<string>
content_md5
</string>
</key>
<value>
...
...
@@ -223,7 +229,7 @@
</item>
<item>
<key>
<string>
actor
</string>
</key>
<value>
<string>
zope
</string>
</value>
<value>
<string>
P0
</string>
</value>
</item>
<item>
<key>
<string>
comment
</string>
</key>
...
...
@@ -237,7 +243,7 @@
</item>
<item>
<key>
<string>
serial
</string>
</key>
<value>
<string>
96
1.1752.42277.50636
</string>
</value>
<value>
<string>
96
9.27633.19787.19507
</string>
</value>
</item>
<item>
<key>
<string>
state
</string>
</key>
...
...
@@ -255,7 +261,7 @@
</tuple>
<state>
<tuple>
<float>
15
01252142.23
</float>
<float>
15
33640688.31
</float>
<string>
UTC
</string>
</tuple>
</state>
...
...
bt5/erp5_officejs_ooffice/PathTemplateItem/web_page_module/gadget_ooffice_jio_presentation_view_js.js
View file @
6c6488e7
...
...
@@ -3,6 +3,8 @@
(
function
(
window
,
rJS
,
RSVP
,
jIO
,
Blob
)
{
"
use strict
"
;
var
ATT_NAME
=
"
data
"
;
rJS
(
window
)
/////////////////////////////////////////////////////////////////
// Acquired methods
...
...
@@ -10,8 +12,11 @@
.
declareAcquiredMethod
(
"
updateHeader
"
,
"
updateHeader
"
)
.
declareAcquiredMethod
(
"
getUrlParameter
"
,
"
getUrlParameter
"
)
.
declareAcquiredMethod
(
"
getUrlFor
"
,
"
getUrlFor
"
)
.
declareAcquiredMethod
(
"
getSetting
"
,
"
getSetting
"
)
.
declareAcquiredMethod
(
"
updateDocument
"
,
"
updateDocument
"
)
.
declareAcquiredMethod
(
"
jio_getAttachment
"
,
"
jio_getAttachment
"
)
.
declareAcquiredMethod
(
"
jio_get
"
,
"
jio_get
"
)
.
declareAcquiredMethod
(
"
jio_put
"
,
"
jio_put
"
)
.
declareAcquiredMethod
(
"
jio_putAttachment
"
,
"
jio_putAttachment
"
)
.
declareAcquiredMethod
(
"
notifySubmitting
"
,
"
notifySubmitting
"
)
.
declareAcquiredMethod
(
"
notifySubmitted
"
,
'
notifySubmitted
'
)
...
...
@@ -20,16 +25,21 @@
/////////////////////////////////////////////////////////////////
.
declareMethod
(
"
render
"
,
function
(
options
)
{
return
this
.
changeState
({
var
gadget
=
this
;
return
gadget
.
getSetting
(
'
file_extension
'
,
""
)
.
push
(
function
(
result
)
{
return
gadget
.
changeState
({
jio_key
:
options
.
jio_key
,
doc
:
options
.
doc
,
mime_type
:
result
,
content_editable
:
options
.
doc
.
content_type
===
undefined
||
options
.
doc
.
content_type
.
indexOf
(
"
application/x-asc
"
)
===
0
});
});
})
.
onEvent
(
'
submit
'
,
function
()
{
var
gadget
=
this
,
data
;
var
gadget
=
this
,
data
,
name_list
;
return
gadget
.
notifySubmitting
()
.
push
(
function
()
{
return
gadget
.
getDeclaredGadget
(
'
form_view
'
);
...
...
@@ -40,6 +50,11 @@
.
push
(
function
(
content
)
{
data
=
content
.
text_content
;
delete
content
.
text_content
;
name_list
=
gadget
.
state
.
doc
.
filename
.
split
(
'
.
'
);
if
(
name_list
.
pop
()
!==
gadget
.
state
.
mime_type
)
{
name_list
.
push
(
gadget
.
state
.
mime_type
);
content
.
filename
=
name_list
.
join
(
'
.
'
);
}
return
gadget
.
updateDocument
(
content
);
})
.
push
(
function
()
{
...
...
@@ -48,7 +63,16 @@
gadget
.
state
.
jio_key
,
"
data
"
,
jIO
.
util
.
dataURItoBlob
(
data
)
);
)
.
push
(
function
()
{
return
gadget
.
getDeclaredGadget
(
"
ojs_cloudooo
"
);
})
.
push
(
function
(
cloudooo
)
{
return
cloudooo
.
putAllCloudoooConvertionOperation
({
format
:
gadget
.
state
.
mime_type
,
jio_key
:
gadget
.
state
.
jio_key
});
});
}
})
.
push
(
function
()
{
...
...
@@ -61,19 +85,31 @@
})
.
onStateChange
(
function
()
{
var
gadget
=
this
,
data
;
var
gadget
=
this
,
data
,
editable
=
gadget
.
state
.
content_editable
;
return
new
RSVP
.
Queue
()
.
push
(
function
()
{
return
gadget
.
jio_getAttachment
(
gadget
.
state
.
jio_key
,
"
data
"
)
if
(
!
editable
)
{
return
gadget
.
jio_getAttachment
(
gadget
.
state
.
jio_key
,
"
data
"
);
}
return
gadget
.
getDeclaredGadget
(
"
ojs_cloudooo
"
)
.
push
(
function
(
ojs_cloudooo
)
{
return
ojs_cloudooo
.
getConvertedBlob
({
jio_key
:
gadget
.
state
.
jio_key
,
format
:
gadget
.
state
.
mime_type
,
filename
:
gadget
.
state
.
doc
.
filename
});
});
})
.
push
(
undefined
,
function
(
error
)
{
if
(
error
.
status_code
===
404
)
{
if
(
error
instanceof
jIO
.
util
.
jIOError
&&
error
.
status_code
===
404
)
{
return
new
Blob
();
}
throw
error
;
});
})
.
push
(
function
(
blob
)
{
if
(
gadget
.
state
.
content_
editable
)
{
if
(
editable
)
{
return
jIO
.
util
.
readBlobAsDataURL
(
blob
);
}
return
jIO
.
util
.
readBlobAsText
(
blob
);
...
...
@@ -83,7 +119,6 @@
return
gadget
.
getDeclaredGadget
(
'
form_view
'
);
})
.
push
(
function
(
form_gadget
)
{
var
editable
=
gadget
.
state
.
content_editable
;
return
form_gadget
.
render
({
erp5_document
:
{
"
_embedded
"
:
{
"
_view
"
:
{
...
...
@@ -150,7 +185,7 @@
"
key
"
:
"
text_content
"
,
"
hidden
"
:
0
,
"
type
"
:
editable
?
"
GadgetField
"
:
"
EditorField
"
,
"
renderjs_extra
"
:
'
{"editor": "onlyoffice",
'
+
"
renderjs_extra
"
:
'
{"editor": "onlyoffice",
'
+
'
"maximize": true}
'
,
"
url
"
:
"
gadget_editor.html
"
,
"
sandbox
"
:
"
public
"
...
...
@@ -184,7 +219,11 @@
return
RSVP
.
all
([
gadget
.
getUrlFor
({
command
:
'
history_previous
'
}),
gadget
.
getUrlFor
({
command
:
'
selection_previous
'
}),
gadget
.
getUrlFor
({
command
:
'
selection_next
'
})
gadget
.
getUrlFor
({
command
:
'
selection_next
'
}),
gadget
.
getUrlFor
({
command
:
'
change
'
,
options
:
{
'
page
'
:
"
ojs_download_convert
"
}
})
]);
})
.
push
(
function
(
url_list
)
{
...
...
@@ -193,7 +232,8 @@
selection_url
:
url_list
[
0
],
previous_url
:
url_list
[
1
],
next_url
:
url_list
[
2
],
save_action
:
true
save_action
:
true
,
download_url
:
url_list
[
3
]
});
});
});
...
...
bt5/erp5_officejs_ooffice/PathTemplateItem/web_page_module/gadget_ooffice_jio_presentation_view_js.xml
View file @
6c6488e7
...
...
@@ -60,6 +60,12 @@
</tuple>
</value>
</item>
<item>
<key>
<string>
categories
</string>
</key>
<value>
<tuple/>
</value>
</item>
<item>
<key>
<string>
content_md5
</string>
</key>
<value>
...
...
@@ -219,7 +225,7 @@
</item>
<item>
<key>
<string>
actor
</string>
</key>
<value>
<string>
vincent
</string>
</value>
<value>
<string>
P0
</string>
</value>
</item>
<item>
<key>
<string>
comment
</string>
</key>
...
...
@@ -233,7 +239,7 @@
</item>
<item>
<key>
<string>
serial
</string>
</key>
<value>
<string>
96
4.54546.48173.5239
</string>
</value>
<value>
<string>
96
9.27672.42411.61542
</string>
</value>
</item>
<item>
<key>
<string>
state
</string>
</key>
...
...
@@ -251,7 +257,7 @@
</tuple>
<state>
<tuple>
<float>
15
16871823.
9
</float>
<float>
15
33641806.5
9
</float>
<string>
UTC
</string>
</tuple>
</state>
...
...
bt5/erp5_officejs_ooffice/PathTemplateItem/web_page_module/gadget_ooffice_jio_spreadsheet_view_html.html
View file @
6c6488e7
...
...
@@ -22,5 +22,9 @@
data-gadget-sandbox=
"public"
>
</div>
</form>
<div
data-gadget-url=
"gadget_ojs_cloudooo.html"
data-gadget-scope=
"ojs_cloudooo"
data-gadget-sandbox=
"public"
>
</div>
</body>
</html>
bt5/erp5_officejs_ooffice/PathTemplateItem/web_page_module/gadget_ooffice_jio_spreadsheet_view_html.xml
View file @
6c6488e7
...
...
@@ -60,6 +60,12 @@
</tuple>
</value>
</item>
<item>
<key>
<string>
categories
</string>
</key>
<value>
<tuple/>
</value>
</item>
<item>
<key>
<string>
content_md5
</string>
</key>
<value>
...
...
@@ -223,7 +229,7 @@
</item>
<item>
<key>
<string>
actor
</string>
</key>
<value>
<string>
zope
</string>
</value>
<value>
<string>
P0
</string>
</value>
</item>
<item>
<key>
<string>
comment
</string>
</key>
...
...
@@ -237,7 +243,7 @@
</item>
<item>
<key>
<string>
serial
</string>
</key>
<value>
<string>
96
1.645.13018.3652
</string>
</value>
<value>
<string>
96
9.27633.19787.19507
</string>
</value>
</item>
<item>
<key>
<string>
state
</string>
</key>
...
...
@@ -255,7 +261,7 @@
</tuple>
<state>
<tuple>
<float>
15
01252130.3
</float>
<float>
15
33639597.7
</float>
<string>
UTC
</string>
</tuple>
</state>
...
...
bt5/erp5_officejs_ooffice/PathTemplateItem/web_page_module/gadget_ooffice_jio_spreadsheet_view_js.js
View file @
6c6488e7
...
...
@@ -3,6 +3,8 @@
(
function
(
window
,
rJS
,
RSVP
,
jIO
,
Blob
)
{
"
use strict
"
;
var
ATT_NAME
=
"
data
"
;
rJS
(
window
)
/////////////////////////////////////////////////////////////////
// Acquired methods
...
...
@@ -10,8 +12,11 @@
.
declareAcquiredMethod
(
"
updateHeader
"
,
"
updateHeader
"
)
.
declareAcquiredMethod
(
"
getUrlParameter
"
,
"
getUrlParameter
"
)
.
declareAcquiredMethod
(
"
getUrlFor
"
,
"
getUrlFor
"
)
.
declareAcquiredMethod
(
"
getSetting
"
,
"
getSetting
"
)
.
declareAcquiredMethod
(
"
updateDocument
"
,
"
updateDocument
"
)
.
declareAcquiredMethod
(
"
jio_getAttachment
"
,
"
jio_getAttachment
"
)
.
declareAcquiredMethod
(
"
jio_get
"
,
"
jio_get
"
)
.
declareAcquiredMethod
(
"
jio_put
"
,
"
jio_put
"
)
.
declareAcquiredMethod
(
"
jio_putAttachment
"
,
"
jio_putAttachment
"
)
.
declareAcquiredMethod
(
"
notifySubmitting
"
,
"
notifySubmitting
"
)
.
declareAcquiredMethod
(
"
notifySubmitted
"
,
'
notifySubmitted
'
)
...
...
@@ -20,16 +25,21 @@
/////////////////////////////////////////////////////////////////
.
declareMethod
(
"
render
"
,
function
(
options
)
{
return
this
.
changeState
({
var
gadget
=
this
;
return
gadget
.
getSetting
(
'
file_extension
'
,
""
)
.
push
(
function
(
result
)
{
return
gadget
.
changeState
({
jio_key
:
options
.
jio_key
,
doc
:
options
.
doc
,
mime_type
:
result
,
content_editable
:
options
.
doc
.
content_type
===
undefined
||
options
.
doc
.
content_type
.
indexOf
(
"
application/x-asc
"
)
===
0
});
});
})
.
onEvent
(
'
submit
'
,
function
()
{
var
gadget
=
this
,
data
;
var
gadget
=
this
,
data
,
name_list
;
return
gadget
.
notifySubmitting
()
.
push
(
function
()
{
return
gadget
.
getDeclaredGadget
(
'
form_view
'
);
...
...
@@ -40,6 +50,11 @@
.
push
(
function
(
content
)
{
data
=
content
.
text_content
;
delete
content
.
text_content
;
name_list
=
gadget
.
state
.
doc
.
filename
.
split
(
'
.
'
);
if
(
name_list
.
pop
()
!==
gadget
.
state
.
mime_type
)
{
name_list
.
push
(
gadget
.
state
.
mime_type
);
content
.
filename
=
name_list
.
join
(
'
.
'
);
}
return
gadget
.
updateDocument
(
content
);
})
.
push
(
function
()
{
...
...
@@ -48,7 +63,16 @@
gadget
.
state
.
jio_key
,
"
data
"
,
jIO
.
util
.
dataURItoBlob
(
data
)
);
)
.
push
(
function
()
{
return
gadget
.
getDeclaredGadget
(
"
ojs_cloudooo
"
);
})
.
push
(
function
(
cloudooo
)
{
return
cloudooo
.
putAllCloudoooConvertionOperation
({
format
:
gadget
.
state
.
mime_type
,
jio_key
:
gadget
.
state
.
jio_key
});
});
}
})
.
push
(
function
()
{
...
...
@@ -61,19 +85,31 @@
})
.
onStateChange
(
function
()
{
var
gadget
=
this
,
data
;
var
gadget
=
this
,
data
,
editable
=
gadget
.
state
.
content_editable
;
return
new
RSVP
.
Queue
()
.
push
(
function
()
{
return
gadget
.
jio_getAttachment
(
gadget
.
state
.
jio_key
,
"
data
"
)
if
(
!
editable
)
{
return
gadget
.
jio_getAttachment
(
gadget
.
state
.
jio_key
,
"
data
"
);
}
return
gadget
.
getDeclaredGadget
(
"
ojs_cloudooo
"
)
.
push
(
function
(
ojs_cloudooo
)
{
return
ojs_cloudooo
.
getConvertedBlob
({
jio_key
:
gadget
.
state
.
jio_key
,
format
:
gadget
.
state
.
mime_type
,
filename
:
gadget
.
state
.
doc
.
filename
});
});
})
.
push
(
undefined
,
function
(
error
)
{
if
(
error
.
status_code
===
404
)
{
if
(
error
instanceof
jIO
.
util
.
jIOError
&&
error
.
status_code
===
404
)
{
return
new
Blob
();
}
throw
error
;
});
})
.
push
(
function
(
blob
)
{
if
(
gadget
.
state
.
content_
editable
)
{
if
(
editable
)
{
return
jIO
.
util
.
readBlobAsDataURL
(
blob
);
}
return
jIO
.
util
.
readBlobAsText
(
blob
);
...
...
@@ -83,7 +119,6 @@
return
gadget
.
getDeclaredGadget
(
'
form_view
'
);
})
.
push
(
function
(
form_gadget
)
{
var
editable
=
gadget
.
state
.
content_editable
;
return
form_gadget
.
render
({
erp5_document
:
{
"
_embedded
"
:
{
"
_view
"
:
{
...
...
@@ -184,7 +219,11 @@
return
RSVP
.
all
([
gadget
.
getUrlFor
({
command
:
'
history_previous
'
}),
gadget
.
getUrlFor
({
command
:
'
selection_previous
'
}),
gadget
.
getUrlFor
({
command
:
'
selection_next
'
})
gadget
.
getUrlFor
({
command
:
'
selection_next
'
}),
gadget
.
getUrlFor
({
command
:
'
change
'
,
options
:
{
'
page
'
:
"
ojs_download_convert
"
}
})
]);
})
.
push
(
function
(
url_list
)
{
...
...
@@ -193,7 +232,8 @@
selection_url
:
url_list
[
0
],
previous_url
:
url_list
[
1
],
next_url
:
url_list
[
2
],
save_action
:
true
save_action
:
true
,
download_url
:
url_list
[
3
]
});
});
});
...
...
bt5/erp5_officejs_ooffice/PathTemplateItem/web_page_module/gadget_ooffice_jio_spreadsheet_view_js.xml
View file @
6c6488e7
...
...
@@ -60,6 +60,12 @@
</tuple>
</value>
</item>
<item>
<key>
<string>
categories
</string>
</key>
<value>
<tuple/>
</value>
</item>
<item>
<key>
<string>
content_md5
</string>
</key>
<value>
...
...
@@ -219,7 +225,7 @@
</item>
<item>
<key>
<string>
actor
</string>
</key>
<value>
<string>
vincent
</string>
</value>
<value>
<string>
P0
</string>
</value>
</item>
<item>
<key>
<string>
comment
</string>
</key>
...
...
@@ -233,7 +239,7 @@
</item>
<item>
<key>
<string>
serial
</string>
</key>
<value>
<string>
96
5.3116.20089.96
76
</string>
</value>
<value>
<string>
96
9.27672.59993.544
76
</string>
</value>
</item>
<item>
<key>
<string>
state
</string>
</key>
...
...
@@ -251,7 +257,7 @@
</tuple>
<state>
<tuple>
<float>
15
16872229.47
</float>
<float>
15
33641822.14
</float>
<string>
UTC
</string>
</tuple>
</state>
...
...
bt5/erp5_officejs_ooffice/PathTemplateItem/web_page_module/gadget_ooffice_jio_text_view_html.html
View file @
6c6488e7
...
...
@@ -22,5 +22,9 @@
data-gadget-sandbox=
"public"
>
</div>
</form>
<div
data-gadget-url=
"gadget_ojs_cloudooo.html"
data-gadget-scope=
"ojs_cloudooo"
data-gadget-sandbox=
"public"
>
</div>
</body>
</html>
bt5/erp5_officejs_ooffice/PathTemplateItem/web_page_module/gadget_ooffice_jio_text_view_html.xml
View file @
6c6488e7
...
...
@@ -60,6 +60,12 @@
</tuple>
</value>
</item>
<item>
<key>
<string>
categories
</string>
</key>
<value>
<tuple/>
</value>
</item>
<item>
<key>
<string>
content_md5
</string>
</key>
<value>
...
...
@@ -223,7 +229,7 @@
</item>
<item>
<key>
<string>
actor
</string>
</key>
<value>
<string>
zope
</string>
</value>
<value>
<string>
P0
</string>
</value>
</item>
<item>
<key>
<string>
comment
</string>
</key>
...
...
@@ -237,7 +243,7 @@
</item>
<item>
<key>
<string>
serial
</string>
</key>
<value>
<string>
96
1.10686.10882.5973
</string>
</value>
<value>
<string>
96
9.27633.19787.19507
</string>
</value>
</item>
<item>
<key>
<string>
state
</string>
</key>
...
...
@@ -255,7 +261,7 @@
</tuple>
<state>
<tuple>
<float>
15
02111936.98
</float>
<float>
15
33641076.97
</float>
<string>
UTC
</string>
</tuple>
</state>
...
...
bt5/erp5_officejs_ooffice/PathTemplateItem/web_page_module/gadget_ooffice_jio_text_view_js.js
View file @
6c6488e7
...
...
@@ -3,6 +3,8 @@
(
function
(
window
,
rJS
,
RSVP
,
jIO
,
Blob
)
{
"
use strict
"
;
var
ATT_NAME
=
"
data
"
;
rJS
(
window
)
/////////////////////////////////////////////////////////////////
// Acquired methods
...
...
@@ -10,8 +12,11 @@
.
declareAcquiredMethod
(
"
updateHeader
"
,
"
updateHeader
"
)
.
declareAcquiredMethod
(
"
getUrlParameter
"
,
"
getUrlParameter
"
)
.
declareAcquiredMethod
(
"
getUrlFor
"
,
"
getUrlFor
"
)
.
declareAcquiredMethod
(
"
getSetting
"
,
"
getSetting
"
)
.
declareAcquiredMethod
(
"
updateDocument
"
,
"
updateDocument
"
)
.
declareAcquiredMethod
(
"
jio_getAttachment
"
,
"
jio_getAttachment
"
)
.
declareAcquiredMethod
(
"
jio_get
"
,
"
jio_get
"
)
.
declareAcquiredMethod
(
"
jio_put
"
,
"
jio_put
"
)
.
declareAcquiredMethod
(
"
jio_putAttachment
"
,
"
jio_putAttachment
"
)
.
declareAcquiredMethod
(
"
notifySubmitting
"
,
"
notifySubmitting
"
)
.
declareAcquiredMethod
(
"
notifySubmitted
"
,
'
notifySubmitted
'
)
...
...
@@ -20,16 +25,21 @@
/////////////////////////////////////////////////////////////////
.
declareMethod
(
"
render
"
,
function
(
options
)
{
return
this
.
changeState
({
var
gadget
=
this
;
return
gadget
.
getSetting
(
'
file_extension
'
,
""
)
.
push
(
function
(
result
)
{
return
gadget
.
changeState
({
jio_key
:
options
.
jio_key
,
doc
:
options
.
doc
,
mime_type
:
result
,
content_editable
:
options
.
doc
.
content_type
===
undefined
||
options
.
doc
.
content_type
.
indexOf
(
"
application/x-asc
"
)
===
0
});
});
})
.
onEvent
(
'
submit
'
,
function
()
{
var
gadget
=
this
,
data
;
var
gadget
=
this
,
data
,
name_list
;
return
gadget
.
notifySubmitting
()
.
push
(
function
()
{
return
gadget
.
getDeclaredGadget
(
'
form_view
'
);
...
...
@@ -40,6 +50,11 @@
.
push
(
function
(
content
)
{
data
=
content
.
text_content
;
delete
content
.
text_content
;
name_list
=
gadget
.
state
.
doc
.
filename
.
split
(
'
.
'
);
if
(
name_list
.
pop
()
!==
gadget
.
state
.
mime_type
)
{
name_list
.
push
(
gadget
.
state
.
mime_type
);
content
.
filename
=
name_list
.
join
(
'
.
'
);
}
return
gadget
.
updateDocument
(
content
);
})
.
push
(
function
()
{
...
...
@@ -48,7 +63,16 @@
gadget
.
state
.
jio_key
,
"
data
"
,
jIO
.
util
.
dataURItoBlob
(
data
)
);
)
.
push
(
function
()
{
return
gadget
.
getDeclaredGadget
(
"
ojs_cloudooo
"
);
})
.
push
(
function
(
cloudooo
)
{
return
cloudooo
.
putAllCloudoooConvertionOperation
({
format
:
gadget
.
state
.
mime_type
,
jio_key
:
gadget
.
state
.
jio_key
});
});
}
})
.
push
(
function
()
{
...
...
@@ -61,19 +85,31 @@
})
.
onStateChange
(
function
()
{
var
gadget
=
this
,
data
;
var
gadget
=
this
,
data
,
editable
=
gadget
.
state
.
content_editable
;
return
new
RSVP
.
Queue
()
.
push
(
function
()
{
return
gadget
.
jio_getAttachment
(
gadget
.
state
.
jio_key
,
"
data
"
)
if
(
!
editable
)
{
return
gadget
.
jio_getAttachment
(
gadget
.
state
.
jio_key
,
"
data
"
);
}
return
gadget
.
getDeclaredGadget
(
"
ojs_cloudooo
"
)
.
push
(
function
(
ojs_cloudooo
)
{
return
ojs_cloudooo
.
getConvertedBlob
({
jio_key
:
gadget
.
state
.
jio_key
,
format
:
gadget
.
state
.
mime_type
,
filename
:
gadget
.
state
.
doc
.
filename
});
});
})
.
push
(
undefined
,
function
(
error
)
{
if
(
error
.
status_code
===
404
)
{
if
(
error
instanceof
jIO
.
util
.
jIOError
&&
error
.
status_code
===
404
)
{
return
new
Blob
();
}
throw
error
;
});
})
.
push
(
function
(
blob
)
{
if
(
gadget
.
state
.
content_
editable
)
{
if
(
editable
)
{
return
jIO
.
util
.
readBlobAsDataURL
(
blob
);
}
return
jIO
.
util
.
readBlobAsText
(
blob
);
...
...
@@ -83,7 +119,6 @@
return
gadget
.
getDeclaredGadget
(
'
form_view
'
);
})
.
push
(
function
(
form_gadget
)
{
var
editable
=
gadget
.
state
.
content_editable
;
return
form_gadget
.
render
({
erp5_document
:
{
"
_embedded
"
:
{
"
_view
"
:
{
...
...
@@ -184,7 +219,11 @@
return
RSVP
.
all
([
gadget
.
getUrlFor
({
command
:
'
history_previous
'
}),
gadget
.
getUrlFor
({
command
:
'
selection_previous
'
}),
gadget
.
getUrlFor
({
command
:
'
selection_next
'
})
gadget
.
getUrlFor
({
command
:
'
selection_next
'
}),
gadget
.
getUrlFor
({
command
:
'
change
'
,
options
:
{
'
page
'
:
"
ojs_download_convert
"
}
})
]);
})
.
push
(
function
(
url_list
)
{
...
...
@@ -193,7 +232,8 @@
selection_url
:
url_list
[
0
],
previous_url
:
url_list
[
1
],
next_url
:
url_list
[
2
],
save_action
:
true
save_action
:
true
,
download_url
:
url_list
[
3
]
});
});
});
...
...
bt5/erp5_officejs_ooffice/PathTemplateItem/web_page_module/gadget_ooffice_jio_text_view_js.xml
View file @
6c6488e7
...
...
@@ -60,6 +60,12 @@
</tuple>
</value>
</item>
<item>
<key>
<string>
categories
</string>
</key>
<value>
<tuple/>
</value>
</item>
<item>
<key>
<string>
content_md5
</string>
</key>
<value>
...
...
@@ -219,7 +225,7 @@
</item>
<item>
<key>
<string>
actor
</string>
</key>
<value>
<string>
vincent
</string>
</value>
<value>
<string>
P0
</string>
</value>
</item>
<item>
<key>
<string>
comment
</string>
</key>
...
...
@@ -233,7 +239,7 @@
</item>
<item>
<key>
<string>
serial
</string>
</key>
<value>
<string>
96
4.54546.48173.5239
</string>
</value>
<value>
<string>
96
9.27671.44198.55722
</string>
</value>
</item>
<item>
<key>
<string>
state
</string>
</key>
...
...
@@ -251,7 +257,7 @@
</tuple>
<state>
<tuple>
<float>
15
16871791.58
</float>
<float>
15
33641764.26
</float>
<string>
UTC
</string>
</tuple>
</state>
...
...
bt5/erp5_officejs_ooffice/PathTemplateItem/web_page_module/gadget_ooffice_presentation_appcache.xml
View file @
6c6488e7
...
...
@@ -63,9 +63,7 @@
<item>
<key>
<string>
categories
</string>
</key>
<value>
<tuple>
<string>
contributor/person_module/1
</string>
</tuple>
<tuple/>
</value>
</item>
<item>
...
...
@@ -206,11 +204,30 @@ gadget_editor.html\n
gadget_editor.js\n
gadget_button_maximize.html\n
gadget_button_maximize.js\n
gadget_erp5_pt_form_dialog.html\n
gadget_erp5_pt_form_dialog.js\n
gadget_erp5_field_file.html\n
gadget_erp5_field_file.js\n
gadget_erp5_field_list.html\n
gadget_erp5_field_list.js\n
gadget_html5_select.html\n
gadget_html5_select.js\n
\n
#setting\n
gadget_officejs_setting.js\n
gadget_officejs_setting.html\n
\n
\n
#cloudooo\n
gadget_ojs_cloudooo.html\n
gadget_ojs_cloudooo.js\n
gadget_cloudooo.html\n
gadget_cloudooo.js\n
gadget_erp5_page_ojs_upload_convert.html\n
gadget_erp5_page_ojs_upload_convert.js\n
gadget_erp5_page_ojs_download_convert.html\n
gadget_erp5_page_ojs_download_convert.js\n
\n
#presentation\n
gadget_ooffice_presentation_router.html\n
gadget_officejs_jio_presentation_view.html\n
...
...
@@ -1359,7 +1376,7 @@ NETWORK:\n
</item>
<item>
<key>
<string>
actor
</string>
</key>
<value>
<string>
zope
</string>
</value>
<value>
<string>
P0
</string>
</value>
</item>
<item>
<key>
<string>
comment
</string>
</key>
...
...
@@ -1373,7 +1390,7 @@ NETWORK:\n
</item>
<item>
<key>
<string>
serial
</string>
</key>
<value>
<string>
96
5.1014.10748.1368
7
</string>
</value>
<value>
<string>
96
9.27633.19787.1950
7
</string>
</value>
</item>
<item>
<key>
<string>
state
</string>
</key>
...
...
@@ -1391,7 +1408,7 @@ NETWORK:\n
</tuple>
<state>
<tuple>
<float>
15
17243462.59
</float>
<float>
15
33639880.53
</float>
<string>
UTC
</string>
</tuple>
</state>
...
...
bt5/erp5_officejs_ooffice/PathTemplateItem/web_page_module/gadget_ooffice_presentation_router_html.html
View file @
6c6488e7
...
...
@@ -22,6 +22,8 @@
<script
data-renderjs-configuration=
"dropbox_app_key"
type=
"text/x-renderjs-configuration"
>
tgbv6bt1grf7muu
</script>
<script
data-renderjs-configuration=
"content_type"
type=
"text/x-renderjs-configuration"
>
application
/
x
-
asc
-
presentation
</script>
<script
data-renderjs-configuration=
"file_extension"
type=
"text/x-renderjs-configuration"
>
ppty
</script>
<script
data-renderjs-configuration=
"upload_dict"
type=
"text/x-renderjs-configuration"
>
{
"
pptx
"
:
"
ppty
"
,
"
ppty
"
:
"
ppty
"
}
</script>
<script
data-renderjs-configuration=
"conversion_dict"
type=
"text/x-renderjs-configuration"
>
{
"
ppty
"
:
[
"
pptx
"
],
"
pptx
"
:
[
"
ppty
"
,
"
pdf
"
]}
</script>
<div
data-gadget-url=
"gadget_erp5_router.html"
data-gadget-scope=
"erp5_router"
></div>
</body>
</html>
\ No newline at end of file
bt5/erp5_officejs_ooffice/PathTemplateItem/web_page_module/gadget_ooffice_presentation_router_html.xml
View file @
6c6488e7
...
...
@@ -60,6 +60,12 @@
</tuple>
</value>
</item>
<item>
<key>
<string>
categories
</string>
</key>
<value>
<tuple/>
</value>
</item>
<item>
<key>
<string>
content_md5
</string>
</key>
<value>
...
...
@@ -223,7 +229,7 @@
</item>
<item>
<key>
<string>
actor
</string>
</key>
<value>
<string>
zope
</string>
</value>
<value>
<string>
P0
</string>
</value>
</item>
<item>
<key>
<string>
comment
</string>
</key>
...
...
@@ -237,7 +243,7 @@
</item>
<item>
<key>
<string>
serial
</string>
</key>
<value>
<string>
96
6.50090.21906.31573
</string>
</value>
<value>
<string>
96
9.30625.2304.34508
</string>
</value>
</item>
<item>
<key>
<string>
state
</string>
</key>
...
...
@@ -255,7 +261,7 @@
</tuple>
<state>
<tuple>
<float>
15
23363204.61
</float>
<float>
15
33818996.6
</float>
<string>
UTC
</string>
</tuple>
</state>
...
...
bt5/erp5_officejs_ooffice/PathTemplateItem/web_page_module/gadget_ooffice_spreadsheet_appcache.xml
View file @
6c6488e7
...
...
@@ -63,9 +63,7 @@
<item>
<key>
<string>
categories
</string>
</key>
<value>
<tuple>
<string>
contributor/person_module/1
</string>
</tuple>
<tuple/>
</value>
</item>
<item>
...
...
@@ -206,11 +204,29 @@ gadget_editor.html\n
gadget_editor.js\n
gadget_button_maximize.html\n
gadget_button_maximize.js\n
gadget_erp5_pt_form_dialog.html\n
gadget_erp5_pt_form_dialog.js\n
gadget_erp5_field_file.html\n
gadget_erp5_field_file.js\n
gadget_erp5_field_list.html\n
gadget_erp5_field_list.js\n
gadget_html5_select.html\n
gadget_html5_select.js\n
\n
#setting\n
gadget_officejs_setting.js\n
gadget_officejs_setting.html\n
\n
#cloudooo\n
gadget_ojs_cloudooo.html\n
gadget_ojs_cloudooo.js\n
gadget_cloudooo.html\n
gadget_cloudooo.js\n
gadget_erp5_page_ojs_upload_convert.html\n
gadget_erp5_page_ojs_upload_convert.js\n
gadget_erp5_page_ojs_download_convert.html\n
gadget_erp5_page_ojs_download_convert.js\n
\n
#spreadsheet\n
gadget_ooffice_spreadsheet_router.html\n
gadget_officejs_jio_spreadsheet_view.html\n
...
...
@@ -1359,7 +1375,7 @@ NETWORK:\n
</item>
<item>
<key>
<string>
actor
</string>
</key>
<value>
<string>
zope
</string>
</value>
<value>
<string>
P0
</string>
</value>
</item>
<item>
<key>
<string>
comment
</string>
</key>
...
...
@@ -1373,7 +1389,7 @@ NETWORK:\n
</item>
<item>
<key>
<string>
serial
</string>
</key>
<value>
<string>
96
5.1012.19255.29354
</string>
</value>
<value>
<string>
96
9.27633.19787.19507
</string>
</value>
</item>
<item>
<key>
<string>
state
</string>
</key>
...
...
@@ -1391,7 +1407,7 @@ NETWORK:\n
</tuple>
<state>
<tuple>
<float>
15
17243409.91
</float>
<float>
15
33639878.17
</float>
<string>
UTC
</string>
</tuple>
</state>
...
...
bt5/erp5_officejs_ooffice/PathTemplateItem/web_page_module/gadget_ooffice_spreadsheet_router_html.html
View file @
6c6488e7
...
...
@@ -22,6 +22,8 @@
<script
data-renderjs-configuration=
"dropbox_app_key"
type=
"text/x-renderjs-configuration"
>
hxq0vjiu9v0r4mu
</script>
<script
data-renderjs-configuration=
"content_type"
type=
"text/x-renderjs-configuration"
>
application
/
x
-
asc
-
spreadsheet
</script>
<script
data-renderjs-configuration=
"file_extension"
type=
"text/x-renderjs-configuration"
>
xlsy
</script>
<script
data-renderjs-configuration=
"upload_dict"
type=
"text/x-renderjs-configuration"
>
{
"
xlsx
"
:
"
xlsy
"
,
"
xlsy
"
:
"
xlsy
"
}
</script>
<script
data-renderjs-configuration=
"conversion_dict"
type=
"text/x-renderjs-configuration"
>
{
"
xlsy
"
:
[
"
xlsx
"
],
"
xlsx
"
:
[
"
xlsy
"
,
"
pdf
"
]}
</script>
<div
data-gadget-url=
"gadget_erp5_router.html"
data-gadget-scope=
"erp5_router"
></div>
</body>
</html>
\ No newline at end of file
bt5/erp5_officejs_ooffice/PathTemplateItem/web_page_module/gadget_ooffice_spreadsheet_router_html.xml
View file @
6c6488e7
...
...
@@ -60,6 +60,12 @@
</tuple>
</value>
</item>
<item>
<key>
<string>
categories
</string>
</key>
<value>
<tuple/>
</value>
</item>
<item>
<key>
<string>
content_md5
</string>
</key>
<value>
...
...
@@ -223,7 +229,7 @@
</item>
<item>
<key>
<string>
actor
</string>
</key>
<value>
<string>
zope
</string>
</value>
<value>
<string>
P0
</string>
</value>
</item>
<item>
<key>
<string>
comment
</string>
</key>
...
...
@@ -237,7 +243,7 @@
</item>
<item>
<key>
<string>
serial
</string>
</key>
<value>
<string>
96
6.50089.1127.22237
</string>
</value>
<value>
<string>
96
9.30624.38120.45568
</string>
</value>
</item>
<item>
<key>
<string>
state
</string>
</key>
...
...
@@ -255,7 +261,7 @@
</tuple>
<state>
<tuple>
<float>
15
23363197.37
</float>
<float>
15
33818989.4
</float>
<string>
UTC
</string>
</tuple>
</state>
...
...
bt5/erp5_officejs_ooffice/PathTemplateItem/web_page_module/gadget_ooffice_text_appcache.xml
View file @
6c6488e7
...
...
@@ -63,9 +63,7 @@
<item>
<key>
<string>
categories
</string>
</key>
<value>
<tuple>
<string>
contributor/person_module/1
</string>
</tuple>
<tuple/>
</value>
</item>
<item>
...
...
@@ -206,11 +204,29 @@ gadget_editor.html\n
gadget_editor.js\n
gadget_button_maximize.html\n
gadget_button_maximize.js\n
gadget_erp5_pt_form_dialog.html\n
gadget_erp5_pt_form_dialog.js\n
gadget_erp5_field_file.html\n
gadget_erp5_field_file.js\n
gadget_erp5_field_list.html\n
gadget_erp5_field_list.js\n
gadget_html5_select.html\n
gadget_html5_select.js\n
\n
#setting\n
gadget_officejs_setting.js\n
gadget_officejs_setting.html\n
\n
#cloudooo\n
gadget_ojs_cloudooo.html\n
gadget_ojs_cloudooo.js\n
gadget_cloudooo.html\n
gadget_cloudooo.js\n
gadget_erp5_page_ojs_upload_convert.html\n
gadget_erp5_page_ojs_upload_convert.js\n
gadget_erp5_page_ojs_download_convert.html\n
gadget_erp5_page_ojs_download_convert.js\n
\n
#text\n
gadget_ooffice_text_router.html\n
gadget_officejs_jio_text_view.html\n
...
...
@@ -1359,7 +1375,7 @@ NETWORK:\n
</item>
<item>
<key>
<string>
actor
</string>
</key>
<value>
<string>
zope
</string>
</value>
<value>
<string>
P0
</string>
</value>
</item>
<item>
<key>
<string>
comment
</string>
</key>
...
...
@@ -1373,7 +1389,7 @@ NETWORK:\n
</item>
<item>
<key>
<string>
serial
</string>
</key>
<value>
<string>
96
5.1007.59634.37529
</string>
</value>
<value>
<string>
96
9.27633.19787.19507
</string>
</value>
</item>
<item>
<key>
<string>
state
</string>
</key>
...
...
@@ -1391,7 +1407,7 @@ NETWORK:\n
</tuple>
<state>
<tuple>
<float>
15
17243378.3
</float>
<float>
15
33639875.22
</float>
<string>
UTC
</string>
</tuple>
</state>
...
...
bt5/erp5_officejs_ooffice/PathTemplateItem/web_page_module/gadget_ooffice_text_router.html.html
View file @
6c6488e7
...
...
@@ -22,6 +22,8 @@
<script
data-renderjs-configuration=
"dropbox_app_key"
type=
"text/x-renderjs-configuration"
>
lj7mua2rf67bo20
</script>
<script
data-renderjs-configuration=
"content_type"
type=
"text/x-renderjs-configuration"
>
application
/
x
-
asc
-
text
</script>
<script
data-renderjs-configuration=
"file_extension"
type=
"text/x-renderjs-configuration"
>
docy
</script>
<script
data-renderjs-configuration=
"upload_dict"
type=
"text/x-renderjs-configuration"
>
{
"
docx
"
:
"
docy
"
,
"
docy
"
:
"
docy
"
}
</script>
<script
data-renderjs-configuration=
"conversion_dict"
type=
"text/x-renderjs-configuration"
>
{
"
docy
"
:
[
"
docx
"
],
"
docx
"
:
[
"
docy
"
,
"
pdf
"
]}
</script>
<div
data-gadget-url=
"gadget_erp5_router.html"
data-gadget-scope=
"erp5_router"
></div>
</body>
</html>
\ No newline at end of file
bt5/erp5_officejs_ooffice/PathTemplateItem/web_page_module/gadget_ooffice_text_router.html.xml
View file @
6c6488e7
...
...
@@ -60,6 +60,12 @@
</tuple>
</value>
</item>
<item>
<key>
<string>
categories
</string>
</key>
<value>
<tuple/>
</value>
</item>
<item>
<key>
<string>
content_md5
</string>
</key>
<value>
...
...
@@ -223,7 +229,7 @@
</item>
<item>
<key>
<string>
actor
</string>
</key>
<value>
<string>
zope
</string>
</value>
<value>
<string>
P0
</string>
</value>
</item>
<item>
<key>
<string>
comment
</string>
</key>
...
...
@@ -237,7 +243,7 @@
</item>
<item>
<key>
<string>
serial
</string>
</key>
<value>
<string>
96
6.44435.28144.21572
</string>
</value>
<value>
<string>
96
9.30624.53361.48776
</string>
</value>
</item>
<item>
<key>
<string>
state
</string>
</key>
...
...
@@ -255,7 +261,7 @@
</tuple>
<state>
<tuple>
<float>
15
23363000.9
6
</float>
<float>
15
33818981.6
6
</float>
<string>
UTC
</string>
</tuple>
</state>
...
...
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